The processing function of the keyboard event
1, KeyDown: When the user presses any key on the keyboard to trigger, if press and hold, will repeatedly trigger.
<script type= "Text/javascript" > function() { function () {// do not need an object to call alert (' Lee ');} ; } </script>
2, KeyPress: When the user presses the character key on the keyboard to trigger, if press and hold, the trigger will be repeated.
<script type= "Text/javascript" > function() { function () { alert (' Lee '); </script>
3, KeyUp: When the user presses any key on the keyboard to release the key on the keyboard will be triggered.
<script type= "Text/javascript" > function() { function () { alert (' Lee ');} ; </script>
Second, the processing function of HTML event
1.load: Automatically fires on the window when the page is fully loaded, or fires on the frameset after the frameset has finished loading.
<script type= "Text/javascript" > function() { alert (' Lee '); } </script>
2.unload: When the page is completely unloaded (no, the refresh will be there) automatically triggered on the window, or when the frameset is unloaded and triggered on the frameset.
<script type= "Text/javascript" > function() { alert (' Lee '); } </script>
3.select: Triggered when the user selects one or more characters in a text box (input or textarea) and releases it.
<script type= "Text/javascript" > function() { var input = document.getElementsByTagName ("input") [0]; Input.onselect=function() { alert (' Lee '); }; } ; </script>
4.change: Triggers when text box (input or textarea) content changes and loses focus
<script type= "Text/javascript" > function() { var input = document.getElementsByTagName ("input") [0]; Input.onchange=function() { alert (' Lee '); }; } ; </script>
5.focus: Triggers on window and related elements when the page or element receives focus
<script type= "Text/javascript" > function() { var input = document.getElementsByTagName ("input") [0]; Input.onfocus=function() { alert (' Lee '); }; } ; </script>
6.blur: Triggers on window and related elements when the page or element loses focus.
<script type= "Text/javascript" > function() { var input = document.getElementsByTagName ("input") [0]; Input.onblur=function() { alert (' Lee '); }; } ; </script>
7.submit: Triggered on the <form> element when the user clicks the Submit button.
<script type= "Text/javascript" > function() { var form = document.getElementsByTagName ("form") [0]; Form.onsubmit=function() { alert (' Lee '); }; } ; </script>
8.reset: Triggered on the <form> element when the user clicks the reset button.
<script type= "Text/javascript" > function() { var form = document.getElementsByTagName ("form") [0]; Form.onreset=function() { alert (' Lee '); }; } ; </script>
9.resize: Triggers when the size of the window or frame changes (Firefox executes two times).
<script type= "Text/javascript" > function() { alert (' Lee '); }; </script>
10.scroll: Triggered when the user scrolls an element with a scrollbar (some browsers refresh when the scroll bar moves and the event executes).
<script type= "Text/javascript" >Window.onscroll=function() {alert (' Lee '); };</script>JavaScript Event _ handler function for keyboard event and HTML event handler