Event onkeypress
The onkeypress event is triggered when the user presses a button on the keyboard. To trigger the onkeypress event, make sure that this window has focus.
<html>
<head>
<script>
function message()
{ alert(“This alert box was triggered when you pressed a button on your keyboard”); }
</script>
</head>
<body>
<p>The onkeypress event is triggered when the user presses a button on the keyboard.</p>
<p>To trigger the onkeypress event, make sure that this window has focus.</p>
</body>
</html>
DOWNLOAD SOLUTION HERE<head>
<script>
function message()
{ alert(“This alert box was triggered when you pressed a button on your keyboard”); }
</script>
</head>
<body>
<p>The onkeypress event is triggered when the user presses a button on the keyboard.</p>
<p>To trigger the onkeypress event, make sure that this window has focus.</p>
</body>
</html>
Pingback: Learn DHTML Step by Step | PakTutorial()