I have several textbox in a html form. When user press enter key, the focus should move to the next textbox.
Following is the code that I use:
<form name=”form1″>
<input type=”text” name=”txt1″ onkeypress=”if (event.keyCode==’13′)
document.form1.txt2.focus()”>
<input type=”text” name=”txt2″>
</form>
Be First To Comment
Related Post
Leave Your Comments Below