Posted By

gux on 08/16/06


Tagged

javascript key enter


Versions (?)

Who likes this?

19 people have marked this snippet as a favorite

luman
meth
alexsancho
fayans
vali29
SpinZ
yetanother
x-or
hans
jeremyhcobb
ckayra
masondixon
seanpowell
dekehooper
aegony
hobbyman
rokfresh
guo3823538
Priestd09


Disable the Enter Key in Form


 / Published in: JavaScript
 

URL: http://www.felgall.com/jstip43.htm

added to the head section of the page

  1. function kH(e) {
  2. var pK = e ? e.which : window.event.keyCode;
  3. return pK != 13;
  4. }
  5. document.onkeypress = kH;
  6. if (document.layers) document.captureEvents(Event.KEYPRESS);

Report this snippet  

You need to login to post a comment.