.keyup() method is used to bind an event handler with the keyup javascript event. Suppose we have an input field and we want to invoke an alert box for each key we press. Then, the event handler should be bind to that input field.
Example:
test.html
<input type="text" id="email"></textarea>
<input type="submit" value="Send" class="register"/>
abc.js
$(document).ready(function(){
$('.register').prop('disabled',true);
$('#email').keyup(function(){
alert("key pressed");
})
});
0 Comment(s)