Following code helpful to handle to submit the button when enter key entered.
HTML:
HTML:
<div onkeypress="loginOnEnterKey(event);">
..code goes here
<input type="button" onclick="login()">LOGIN</a>
</div>
JAVASCRIPT:
function loginOnEnterKey(event){
if(event.keyCode == 13) {
$('#btnlogin').focus();
login();
}
}
No comments:
Post a Comment