Javascript examples for jQuery Method and Property:keyup
Get which was press in key up event handler
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("input").keyup(function(event){ $("div").html("Key: " + event.which); });/*from ww w. ja va 2 s . c om*/ }); </script> </head> <body> <p>type in the field.</p> Enter your name: <input type="text"> <div /> </body> </html>