If I have an HTML table...say
col1 Val1 < 9条回答 不要未来只要你来 (楼主) 2020-11-22 13:27 This solution worked perfectly for me var table = document.getElementById("myTable").rows; var y; for(i = 0; i < # of rows; i++) { for(j = 0; j < # of columns; j++) { y = table[i].cells; //do something with cells in a row y[j].innerHTML = ""; } } 0 讨论(0) 查看其它9个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
This solution worked perfectly for me
var table = document.getElementById("myTable").rows; var y; for(i = 0; i < # of rows; i++) { for(j = 0; j < # of columns; j++) { y = table[i].cells; //do something with cells in a row y[j].innerHTML = ""; } }