TAILIEUCHUNG - JavaScript Bible, Gold Edition part 37

JavaScript Bible, Gold Edition part 37. This book will bring programmers and non-technical professionals, including casual programmers and scripters, painlessly up to speed on all aspects of mastering JavaScript. Key topics include programming fundamentals, JavaScript language elements and how to use them effectively, and how to easily and efficiently add powerful new functionality to HTML documents and Java applets. | 208 Part III Document Objects Reference Day INPUT Name day Type text Size 3 VALUE onKeyUp jumpNext this year maxLength 2 Year INPUT Name year Type text Size 3 VALUE onKeyUp jumpNext this month maxLength 2 FORM BODY HTML These three events do not fire for all keys of the typical PC keyboard on all browser versions that support keyboard events. The only keys that you can rely on supporting the events in all browsers shown in the preceding compatibility chart are the alphanumeric keys represented by ASCII values. This includes keys such as the spacebar and Enter Return on the Mac but it excludes all function keys arrow keys and other navigation keys. Modifier keys such as Shift Ctrl PC Alt PC Command Mac and Option Mac generate some events on their own depending on browser and version . However functions invoked by other key events can always inspect the pressed states of these modifier keys. Scripting keyboard events almost always entails examining which key is pressed so that some processing or validation can be performed on that key press. This is where the situation gets very complex if you are writing for cross-browser implementation. In some cases even writing just for Internet Explorer gets tricky because non-alphanumeric keys generate only the onKeyDown and onKeyUp events. In fact to fully comprehend keyboard events you need to make a distinction between key codes and character codes. Every PC keyboard key has a key code associated with it. This key code is always the same regardless of what other keys you press at the same time. Only the alphanumeric keys letters numbers spacebar and so on however generate character codes. The code represents the typed character produced by that key. The value might change if you press a modifier key. For example if you type the A key by itself it generates a lowercase a character character code 97 if you also hold down the Shift key that same key produces an uppercase A character character code 65 . The key code for that key

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.