functioniterate() {
var table = document.getElementById("tabla").children;
for (b=0; b<table.length; b++) {
var cells = table[b].children;
if(cells[0].children[0].innerHTML == "row1") {
if(cells[0].children[1].innerHTML == "w") {
table[b].style.display="none";
}
}
}
}
iterate();
*{
background-color:pink;
}
<tableid="tabla"><tbody><tr><th>row1</th><td>w</td></tr><tr><th>row2</th><td>x</td></tr></tbody><tbody><tr><th>row1</th><td>y</td></tr><tr><th>row2</th><td>z</td></tr></tbody></table>
Post a Comment for "Html Finding And Stop Displaying Table Child"