JQuery+javascript遍历tr td

时间:2014-05-31 17:02:47   收藏:0   阅读:251

function InitTable(tableID, trName) {
$(tableID + " tr").each(function (index, element) {
if (index == 0 || index == $(tableID + " tr").length - 1) {
return true;
}
var s = element.cells[0].innerHTML;
if ($.trim(s) != ‘‘) {
if (s.indexOf(trName) == -1) {
element.style.display = "none";
}
}
});
}

JQuery+javascript遍历tr td,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!