Share this Page URL
Help

Client-Side Browser Syntax // function that handles the specific event. The evnt parameter refers to // the event object. function handle(evnt){ document.form1.msg.value += " A key was pressed down and let up.\n"; return true; } // This registers the handle function as the event handler for the // KEYPRESS event. window.onKeyUp = handle; // End Hide ---> </script> <form name="form1"> Press a key down. When a key is pressed down and let back up, a message is displayed in the message box indicating that the <b>KEYUP</b> event has occurred. If you press a key down and hold it down, no message displayed. Only when the key is let backup is a message displayed. <br><br> <b>Message box:</b> <textarea name="msg" rows="5" cols="50"></textarea> <br><br> <input type="reset" value="Clear Message Box"> </form> </body> </html> 565