Run
Reset
Chrome
Cobalt
Monokai
Dreamweaver
Vibrant Ink
<!DOCTYPE html> <html lang="en"> <head> <title>Learning jQuery</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> </head> <body> <input type="text"/> <div></div> </body> </html>
/* CSS */
$(document).ready(function(){ $('input[type="text"]').keydown(function(event){ $('div').html(`<p>This is a keydown event of "${event.key}" key.</p>`) }); });