Friday 7 May 2021

JQUERY20

 

<html>

<head>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<script>

$(document).ready(function(){

$(document).keypress(function(e) {

if(e.which == 13) {

document.write('You pressed enter!');

<!-- you can also use console.log('You pressed enter!');-->

}

});

});

</script>

</head>

<body>

<p>Input a value within the textbox and press Enter</p>

<input type="text" id="hello">

</body>

</html>