<!DOCTYPE html>
<html lang="en-US">
<body>
<p>'myFunction' is triggered when a key is being typed inside the input field.</p>
<input type="text" onkeypress="myFunction()">
<script>
function myFunction(){
alert("You pressed a key inside the input field");
}
</script> </body>
</html>