Jquery

jQuery BlockUI 锁页面不错。

光标enter tab

function enterIndex(){
 var $els=$("form").find("input,a").not("[type='hidden']");
 var i=0;
 $els.each(function(){
  $(this).attr("enterTabIndex",i++);
  $(this).bind("keydown",function (){
    var i=$(this).attr("enterTabIndex");
     i++;
    if(event.keyCode == 13){
     if($(this).is("a")){
      $(this)[0].click();
      event.returnValue=false;
     }else{
      var $els=$("form").find("input,a").not("[type='hidden']");
      var nextobj
      if(i<=Number($els.size())-1){
       nextobj=$els.get(i);
      }else{
       nextobj=$els.get(0);
      }
      nextobj.focus();
     }
    }
   
  });
 });
}

原文地址:https://www.cnblogs.com/tianpingwaidao/p/4378185.html