Return to Snippet

Revision: 11278
at January 29, 2009 18:42 by juzerali


Initial Code
<html>
<head>
<script>
document.onkeydown = keydownhandler;
function keydownhandler()
{
	document.testform.displayField.value = "Keycode: " + window.event.keyCode;
}
</script>
</head>
<body>
	<center>
		<form name="testform">
			<input type="text" name="displayField" value="Hit any key">
		</form>
	</center>
</body>
</html>

Initial URL

                                

Initial Description
This code helps in determining the keycode of any key pressed on the keyboard.

Initial Title
Determining keycode values

Initial Tags

                                

Initial Language
HTML