jQuery: Guqula i-ENTER kwi-TAB

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


Umxholo wenqaku uyabambelela kwimigaqo yethu imigaqo yokuziphatha yokuhlela. Ukuxela impazamo cofa apha.

Izimvo ezi-2, shiya ezakho

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa.

*

*

  1. Uxanduva lwedatha: UMiguel Ángel Gatón
  2. Injongo yedatha: Ulawulo lwe-SPAM, ulawulo lwezimvo.
  3. Umthetho: Imvume yakho
  4. Unxibelelwano lwedatha: Idatha ayizukuhanjiswa kubantu besithathu ngaphandle koxanduva lomthetho.
  5. Ukugcinwa kweenkcukacha
  6. Amalungelo: Ngalo naliphi na ixesha unganciphisa, uphinde uphinde ucime ulwazi lwakho.

  1.   FERNANDO sitsho

    Ndiyakuxelela, sebenzisa ikhowudi yakho kwaye ayisebenzi kum, ndifuna ukulawula ukuba xa ucofa u-ENTER wenza umsebenzi we-TAB uhambise ukugxila kwigalelo elilandelayo

  2.   Fuck wena, ndakubeleka sitsho

    Jonga is syntax yekhowudi, njengoko ingasebenzi. Iya kuba kungenxa yeekowuti ezizodwa eziba ngumhlobiso kwaye kukho iikowuti ezimbini ezingavaliyo.