1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
elinks/test/ecmascript/onkeydown.html
2023-09-21 17:38:56 +02:00

20 lines
351 B
HTML

<!DOCTYPE html>
<html>
<body>
<p>A function is triggered when the user is pressing a key in the input field.</p>
<form action="/">
<input type="text" onkeydown="myFunction(event)">
<input type="submit">
</form>
<script>
function myFunction(event) {
alert("You pressed a key inside the input field " + event.keyCode);
}
</script>
</body>
</html>