您的位置:首页 > 其它

输入文本框,焦点自动跳转下一个文本框

2016-06-17 15:18 211 查看


$(".yhjuan").keydown(function(event){

          var num=event.keyCode;

          if(num!=8){

              if($(this).val().length==4){

                  $(this).next().focus();

              }

          }else{

              if($(this).val().length==0){

                  $(this).prev().focus();

              }

          }

      });
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: