andrew4582

button keypress

May 22nd, 2014
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     $("body input").keypress(function (e) {
  2.         if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
  3.             $('#testbutton').click();
  4.           //$('input[type=submit].default').click();
  5.             return false;
  6.         } else {
  7.             return true;
  8.         }
  9.     });
Advertisement
Add Comment
Please, Sign In to add comment