jquery实现页面的搜索功能


 1 $(function(){
 2     $("input[type=button]").click(function(){
 3       var txt=$("input[type=text]").val();
 4       if($.trim(txt)!=""){
 5  
 6         $("table tr:not('#theader')").hide().filter(":contains('"+txt+"')").show().css("background","red");
 7       }else{
 8         $("table tr:not('#theader')").css("background","#fff").show();
 9       }
10     });
11   })

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM