<form >

  <input type="text" class="input_w150" vili="true" onkeyup="formatBankNo(this)"/>

      <input type="text" class="input_w150" vili="true" onkeyup="formatBankNo(this)"/>

      <input type="text" class="input_w150" vili="true" onkeyup="formatBankNo(this)"/>

</form>





$("input").each(function(index){ //取得整个页面的input值

$("input:text").each(function(index){
  alert(index);//循环的下标值,从0开始
  alert(this.value);  alert($(this).attr("type"));  //自带属性可以用this(Dom)直接取值
  alert($(this).attr("vili"));                               //自定义属性需要用attr(Jquery)取值
  //if($(this).attr("vili")=="true"&&){
     
  //}
 }); 

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-11-23
  • 2022-12-23
  • 2021-06-09
猜你喜欢
  • 2022-03-04
  • 2021-06-27
  • 2021-12-10
  • 2021-12-10
  • 2021-09-21
  • 2022-12-23
相关资源
相似解决方案