Madura Harshana Madura Harshana - 18 days ago 7
jQuery Question

jquery keydown event is not working properly

$("#id").keydown(function(evt) {
alert('Hello');
});


I tried this, but this is not working, Can you correct this ?

Answer

It works: http://jsfiddle.net/rrikesh/v7MdG/

HTML:

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

JS:

$("#id").keydown(function(evt) {
     alert('Hello');
 }); 
Comments