根路径:<input type="hidden" id="pageContex" value="${base}"/>
条件筛选:<input class="textinput" id="filterName" style="width:250px;"/>
$(document).ready(function(){
pageContex=$("#pageContex").attr("value");//获取根路径
$("#filterName").keyup(function(){
var content = $(this).val();
var contentArr = content.split(",");
var contentValue = "";
for(var i = 0;i < contentArr.length;i++){
contentValue += ":contains('"+contentArr[i]+"'),"; //contains包含
}
contentValue = contentValue.substring(0,contentValue.length-1);
$("#sendInvoiceTable tr[id='tableStr']")
.hide()
.filter(contentValue)
.show();
$("#count").html("条目总数: "+$("#sendInvoiceTable tr[id='tableStr']").filter(contentValue).length);
}).keyup();
});
[img]http://dl.iteye.com/upload/attachment/0071/3845/ec2c0d48-7da3-3352-a240-99fc6a5da1ce.jpg[/img]
条件筛选:<input class="textinput" id="filterName" style="width:250px;"/>
$(document).ready(function(){
pageContex=$("#pageContex").attr("value");//获取根路径
$("#filterName").keyup(function(){
var content = $(this).val();
var contentArr = content.split(",");
var contentValue = "";
for(var i = 0;i < contentArr.length;i++){
contentValue += ":contains('"+contentArr[i]+"'),"; //contains包含
}
contentValue = contentValue.substring(0,contentValue.length-1);
$("#sendInvoiceTable tr[id='tableStr']")
.hide()
.filter(contentValue)
.show();
$("#count").html("条目总数: "+$("#sendInvoiceTable tr[id='tableStr']").filter(contentValue).length);
}).keyup();
});
[img]http://dl.iteye.com/upload/attachment/0071/3845/ec2c0d48-7da3-3352-a240-99fc6a5da1ce.jpg[/img]