$('tr').each(function(){
        vat text=$("#text");//搜索内容
        if(text!=“全部”){
            $(this).css('display','none'); //先隐藏所有tr
            //判断第二列“td:eq(1)”是否包含搜索内容
            if($(this).find("td:eq(1)").html().indexOf(text)>=0){
                $(this).show();  //显示搜索到的部分   
            }
        }else{
              $(this).show();  //显示所有内容
        }
});

相关文章:

  • 2021-08-16
  • 2022-12-23
  • 2021-11-18
  • 2021-11-21
猜你喜欢
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-31
相关资源
相似解决方案