Home >Web Front-end >HTML Tutorial >How to position the focus on the linkbutton by pressing Enter in the input? _html/css_WEB-ITnose
The code is as follows:
$( '#password').textbox('textbox' ).keydown(function (e) {
if (e.keyCode == 13) {
$( " #login").linkbutton('linkbutton' ).focus();
🎜> form> ;/td>
td>
if(e.keyCode==13 && usernameObj.value){
document.getElementById("password").focus();
} }
}
🎜> $( "#login").linkbutton('linkbutton' ) returns not a jquery object
I guess it should be like this: $( "#login").focus()