jQuery - press enter to search with keypress()

0 votes
120 views
added Jun 28 in jQuery by lcjr First Warrant Officer (9,190 points)
HTML
<input type="text" id="PressSearch" />

 

$('#PressSearch').keypress(function(e){
  if(e.which == 13){//Enter keypad
    alert('Press enter keypad to search....');
  }
});

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...