首页>>表单>>jQuery模糊匹配下拉输入框(2019-07-30)

jQuery模糊匹配下拉输入框

jQuery模糊匹配下拉输入框
赞赏支持
立刻微信赞赏支持 关闭

 

XML/HTML Code
  1. <div class="input-box input-Selector">  
  2. <input type="text" class="wx-input">  
  3. </div>  
  4. <div class="input-box input-Selector">  
  5. <input type="text" class="wx-input">  
  6. </div>  
  7. <div class="input-box input-Selector">  
  8. <input type="text" class="wx-input">  
  9. </div>  
  10. <div class="input-box2 input-Selector">  
  11. <input type="text" class="wx-input">  
  12. </div>  

 

JavaScript Code
  1. <script>  
  2.     $(function(){  
  3.         $(".input-box").wxSelect({  
  4.             data:[{"name":"admin","value":21},{"name":"animation","value":11},{"name":"available","value":13},{"name":"bady","value":23},{"name":"coun","value":23},{"name":"张三","value":23},{"name":"周琪","value":19},{"name":"赵六","value":26},{"name":"王五","value":22},{"name":"李四","value":25},{"name":"张麻子","value":25}]  
  5.         });  
  6.         $(".input-box2").wxSelect({  
  7.             data:[{"name":"张三","value":23},{"name":"周琪","value":19},{"name":"赵六","value":26},{"name":"王五","value":22},{"name":"李四","value":25},{"name":"张麻子","value":25}]  
  8.         });  
  9.     })  
  10. </script>  

 


原文地址:http://www.freejs.net/article_biaodan_803.html