+ 1
Fetching the entered key on the keyboard with jquery--Returns a number
I took an interesting Jquery course here on Solo Learn and i came across some snippet of code that should display the value of the keyboard button that was pressed.. Below is the code <!DOCTYPE html> <html> <head> <script src="jqeury-3.4.1.min.js"></script> </head> <body> <input type="search" id="name"> <script> $(document).ready(function(){ $("#name").keydown(function(){ alert(event.which); }); }); </script> </body> </html> Why isn't it returning the actual letter when i press on one, its just returning numbers
4 Respuestas
+ 1
By default, thats how they are supposed to work... Thanks. Is there a jquery function to return the letter
0
Thanks a lot @JME