CD-557Appendix F . Examples from Parts III and (Com web hosting)

CD-557Appendix F . Examples from Parts III and IV Here are some specific tasks to try with the page to examine key codes (if you are not using a browser set for English and a Latin-based keyboard, your results may vary): 1. Enter a lowercase letter a . Notice how the onKeyPress event handler shows the charCode to be 97, which is the Unicode (and ASCII) value for the first of the lowercase letters of the Latin alphabet. But the other two event types record just the key s code: 65. 2. Type an uppercase A via the Shift key. If you watch closely, you see that the Shift key, itself, generates the key code 16 for the onKeyDown and onKeyUp events. But the character key then shows the value 65 for all three events (until you release the Shift key), because the ASCII value of the uppercase letter happens to match the keyboard key code for that letter. 3. Press and release the Down Arrow key (be sure the cursor still flashes in the TEXTAREA, because that s where the keyboard events are being monitored). As a non-character key, all three events stuff a value into the keyCode property, but zero into charCode. The keyCode value for this key is 40. 4. Poke around with other non-character keys. Some may produce dialog boxes or menus, but their key codes are recorded nonetheless. clientX clientY layerX layerY pageX pageY screenX screenY NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility (NN6) eventObject.clientX
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Leave a Reply