<input name="keywords" id="search" type="text" style="width:20%;margin-left: 10%;" placeholder="请输入关键词搜索"/>
<span>请输入关键词进行搜索</span>
<script type="text/javascript">
$(function(){
$("#search").keyup(function(){
var input=$(this).val();
if(input.length>0){
$(".tr_content").css("display","none");
$(".tr_content").filter(function(){
return $(this).text().indexOf(input)>=0;
}).css("display","");
}else{
$(".tr_content").css("display","");
}
});
});
</script>
<tr class="tr_content">
<td>哈哈哈哈</td>.....
</tr/>
<tr class="tr_content">
<td>哈哈哈哈</td>.....
</tr/>