zoukankan      html  css  js  c++  java
  • 序列号多个input输入demo

    <input class="inputs" type="text" maxlength="4" />
    <input class="inputs" type="text" maxlength="4" />
    <input class="inputs" type="text" maxlength="4" />
    <input class="inputs" type="text" maxlength="4" />
    <input class="inputs" type="text" maxlength="4" />
    <input class="inputs" type="text" maxlength="4" />
    
    
    $(".inputs").keyup(function () {
        if (this.value.length == this.maxLength) {
          $(this).next('.inputs').focus();
        }
        if (this.value.length == 0) {
          $(this).prev('.inputs').focus();
        }
    });
    

      

  • 相关阅读:
    SED{shell三剑客awk,sed,grep}
    AWK{shell三剑客awk,sed,grep}
    面试汇总
    shell脚本
    redis主从
    haproxy
    grafana
    zabbix
    lnmp
    shell 基础
  • 原文地址:https://www.cnblogs.com/freespider/p/10217453.html
Copyright © 2011-2022 走看看