【发布时间】:2014-09-17 04:16:56
【问题描述】:
我想通过this link进行搜索
但我有multiple row 可以在td 值中搜索,那么我如何添加来自所有td 的数据进行搜索?
谢谢!
$("#search").on("keyup", function() {
var value = $(this).val();
$("table tr").each(function(index) {
if (index !== 0) {
$row = $(this);
var id = $row.find("td:first").text();
if (id.indexOf(value) !== 0) {
$row.hide();
}
else {
$row.show();
}
}
});
});
【问题讨论】:
标签: javascript jquery