Tuesday, June 5, 2012

jQuery : Protect form submission on enter key-press



$(function() {
$("form").bind("keypress", function(e) {
if (e.keyCode == 13) return false;
});
});

No comments:

Post a Comment