jquery เมื่อกด Enter จะเปลี่ยน Focus คำสั่ง Focus ตามด้านล่าง
$("[tabindex='"+index+"']").focus();
jquery disable
$('input[name=sex]').attr("disabled",true);
คำสั่ง html
<input type="text" name="firstname" tabindex="1">
<input type="text" name="lastname" tabindex="2">
<input type="radio" name="sex" value="male" checked tabindex="3">Male
<br>
<input type="radio" name="sex" value="female">Female
<input type="text" name="firstname" value="Mickey" tabindex="4">
<input type="submit" value="Submit" tabindex="5">
ปัญหาคือ เวลากด Enter ไปจนถึง type="radio" ซึ่งมัน Disable อยู่ มันจะ Focus ไม่ได้
จะทำยังให้ให้มัน Focus ได้ครับ โดยไม่ต้องไป Enable มัน หรือ Enable ก็ได้ แต่ใช้คำสั่งนี้ $("[tabindex='"+index+"']").focus();