Question:
When I press the Enter key in the username textbox, how can the focus jump to the password textbox?
Reply to discussion (solution)
<script> <br> var usernameObj = document.getElementById("username"); <br> usernameObj.onkeydown = function(event) { <br> e = event ? event :(window.event ? window.event : null); <br> // Press Enter key and the input box value is not empty <br> if(e.keyCode==13 && usernameObj.value){ <br> document.getElementById("password").focus(); <br> } <br> } <br> </script>