Var $inp=$(' input: text ');//get all the input box (including an editor)
$inp. Bind (keydown, function (e) {
Var key= e.w hich;
If (key==13) {//13 to enter
E.p reventDefault ();//cancel the enter default state
Var nxtIdx=$inp. Index (this) + 1;
Var readonly=$(" : input: text: eq (" + nxtIdx + ") "). The prop (" readonly ");//get the next focus of state
While (readonly) {//the moment a focus for an editor state skip change focus
NxtIdx=nxtIdx + 1;
Readonly=$(" : the input text: eq (" + nxtIdx + ") "). The prop (" readonly ");
if(! Readonly) {
break;
}
}
$(" : the input text: eq (" + nxtIdx + ") "). The focus ();//get focus
}
Excuse me:
1, var $inp=$(' input: text);//for all input in the input box: text what is this grammar, what kind of book is about
2, e.w hich is what? What materials have speak
CodePudding user response:
The first is the CSS selector syntaxThe second is the rid_device_info_keyboard event object a read-only property
CodePudding user response:
See jq CSS selector https://www.w3school.com.cn/jquery/jquery_ref_selectors.aspA second look at the event object https://developer.mozilla.org/zh-CN/docs/Web/API/KeyboardEvent
Look here, https://developer.mozilla.org/zh-CN/docs/Web does not understand