<input id="textbox" type="text" onkeypress="return myScript(event)" /> //Add control on which you want to focus,for example: <input id="targetTxtBox" type="text"/> //Javascript function: function myScript(e) { if (e.keyCode == 13) { var tb = document.getElementById("targetTxtBox"); tb.focus(); return false; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)