on
英[ɒn] 美[ɑ:n]
prep. (indicating direction) to; (indicating object) to; (indicating position) on...; (indicating time) at the time of...
adv. (put, wear, connect) on; forward, (continue) go on
adj. active situation, state ;used; happening; planned
key
英[ki:] 美[ki]
n.Key; Key (of a typewriter, etc.); key, clue, secret; key (of music)
vt. Type; lock; adjust the tone of...; provide clues
vi. Use a key
adj.Key; main
Third person singular: keys Plural: keys Present participle: keying Past tense: keyed Past participle: keyed
down
UK[daʊn] 美[daʊn]
adv.Down; (sitting, falling, lying) down; (indicating the limit of range or sequence) down to
prep. (from a high place) downward; (indicating position) below; (indicating direction) down along; (indicating time) since...
adj. Downward; depressed ; computer or computer system shut down; (to...) behind the opponent's
n. (bird's) down; down; soft hair; hair
vt. to put down; (especially a large mouth or quickly) drink; cause to fall; shoot down (enemy aircraft, etc.)
vi. come down; descend; [often used in imperative sentences] go down; lie down
Third person singular: downs Plural: downs Present participle: downing Past tense: downed Past participle: downed
javascript onkeydown attribute syntax
Function: Occurs when the user presses a keyboard key.
Syntax: onkeydown="SomeJavaScriptCode"
Parameters: SomeJavaScriptCode Required. Specifies the JavaScript to be executed when this event occurs.
javascript onkeydown attribute example
<html> <body> <script type="text/javascript"> function noNumbers(e) { var keynum var keychar var numcheck if(window.event) // IE { keynum = e.keyCode } else if(e.which) // Netscape/Firefox/Opera { keynum = e.which } keychar = String.fromCharCode(keynum) numcheck = /\d/ return !numcheck.test(keychar) } </script> <form> 数字无法输入(小键盘上的数字可以): <input type="text" onkeydown="return noNumbers(event)" /> </form> </html>
Run instance »
Click the "Run instance" button to view the online instance