Document onkeypress event action : onkeypress « Document « JavaScript Tutorial






<html>
<head>
<script language="JavaScript" type = "text/javascript">
<!--

document.onkeypress = DisplayMsg;

function DisplayMsg()
{
    window.alert("You just pressed a key.");
}

//-->
</script>
<title>Keyboard Event</title>
</head>
<body>
</body>
</html>








14.23.onkeypress
14.23.1.document.onkeypress
14.23.2.Document onkeypress event action