Javascript Reference
Categories: tips

javascript move to next input when ENTER key is pressed

@May 11, 2009, 5:25 a.m.
<input onkeydown="if(event.keyCode==13)event.keyCode=9" name="txt1" />
<input onkeydown="if(event.keyCode==13)event.keyCode=9" name="txt2" />

keyCode = 13 is ENTER pressed event
keyCode = 9 is TAB key

Unfortunately, this is IE only. For firefox, it raises the error 'setting a property that has only a getter', beacuase of read-only property of keyCode.
Test:
lipitor 20mg pills <a href="https://lipiws.top/">cheap atorvastatin 10mg</a> lipitor 10mg generic
Iopqed - 4 months
lipitor 20mg generic <a href="https://lipiws.top/">order atorvastatin 80mg for sale</a> brand lipitor 80mg
Nibzyg - 4 months
buy atorvastatin 10mg pill <a href="https://lipiws.top/">atorvastatin 20mg brand</a> order lipitor 20mg pill
Iwhbrv - 4 months

Powered by Linode.