<!DOCTYPE html>
<html lang="en-US">
<body>
<p>'myFunction' is triggered when a key is released inside the input field.</p>
<input type="text">
<script>
var x = document.getElementsByTagName("input")[0];
function myFunction(){
alert("You released a key inside the input field");
}
x.addEventListener("keyup", myFunction);
</script> </body>
</html>