JavaScript Reference/Event Handlers Reference/onKeyDown
Содержание
"onKeyDown" Example
<source lang="javascript">
<html> <head> <script language="JavaScript"> function function1() {
msg = "on" + event.type + " event fired by " + """ + event.srcElement.id + """; alert(msg)
} </script></head> <body id="myBody" onkeydown="function1()">
Press any key to fire the event
</body> </html>
</source>
"onKeyDown" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <applet> | | |<area> | | | |
| |<body> || |<button>
| | | | | |
| |<custom> | | |
| | | <dir> ||
| |document
- | | | <fieldset> | | | <form> | | |<hn>
|| | <input type="button"> | | |<input type="checkbox"> <input type="file"> | | |<input type="image"> <input type="password"> | | |<input type="radio"> <inputtype="reset"> | | |<input type="submit"> <input type="text"> | | | | | |<label> <legend> |
| |- <listing> | | |<map> <marquee> | | |<menu> <nobr> | | |<noframes> <noscript> | | |<object>
| | |<optgroup> <option> | | |
| | |