$(document).ready(function () {



        $("#filename").bind("input propertychange change",function(event){
            // console.log()
            var iv=$("#filename").val();//获取用户的输入
            var arr=[]
            $("table tr").each(function () {
                var res=$(this).find('td').eq(0).text();
                if (res.indexOf(iv)==-1){//包含用户的输入
                    $(this).hide()
                }else{
                    $(this).show()
                }
                arr.push(res)
            })
        });

    });
Last modification:April 21, 2022
如果觉得我的文章对你有用,请随意赞赏