Javascript Reference Guide

 
 
This guide contains useful Javascript tips.







Key code.



Information
To determine the key code.

Code
    <script type="text/javascript" language="JavaScript">
    function show_key_value() {
        alert("The key code = " + event.keyCode);
    }
    </script>
    Press a key in the textbox: <BR>
    <input type="text" id="Keyboard" maxlength=4 onkeyup='show_key_value()' />
	
Result

Press a key in the textbox: