Isiqhelo esiqhelekileyo kwizicelo zewebhu kukuba indlela yokuziphatha kwe-ENTER isitshixo ayisiyiyo le nto ihlala ikhona, kwaye nge-jQuery ungayitshintsha indlela yokuziphatha ngokulula.
Ikhowudi efunekayo yile:
umsebenzi enter2tab (e) {
ukuba (e.keyCode == 13) {
cb = parseInt ($ (le) .attr ('tabindex'));ukuba ($ (': input [tabindex = \ »+ (cb + 1) +' \ ']')! = null) {
$ (': igalelo [tabindex = \ »+ (cb + 1) +' \ ']'). focus ();
$ (': input [tabindex = \ »+ (cb + 1) +' \ ']') khetha ();
e.preventDefault ();buyela ubuxoki;}}}
Kuya kufuneka ufake umsebenzi we-enter2tab kwisenzo apho ufuna ukuba sisetyenziswe khona, ngaphandle kwemfihlelo engakumbi.
Imvelaphi | ICristalab
Ndiyakuxelela, sebenzisa ikhowudi yakho kwaye ayisebenzi kum, ndifuna ukulawula ukuba xa ucofa u-ENTER wenza umsebenzi we-TAB uhambise ukugxila kwigalelo elilandelayo
Jonga is syntax yekhowudi, njengoko ingasebenzi. Iya kuba kungenxa yeekowuti ezizodwa eziba ngumhlobiso kwaye kukho iikowuti ezimbini ezingavaliyo.