关于 html dom table 的相关操作
source link: https://jiongks.name/blog/2009-07-13
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
关于 html dom table 的相关操作
本文摘自 勾三股四 更早时期的 不老歌 博客。
[HTML DOM Table].cells[]
[HTML DOM Table].rows[]
[HTML DOM Table].insertRow(index)
[HTML DOM Table].deleteRow(index)
[HTML DOM TableRow].cells[]
[HTML DOM TableRow].rowIndex
[HTML DOM TableRow].insertCell(index)
[HTML DOM TableRow].deleteCell(index)
[HTML DOM TableCell].cellIndex
-----------------------------------
在部分“现代浏览器”中,table 的 innerHTML 是会引起错误的,而且再加上 tbody/thead/tfoot 这种幽灵般的标签的存在,个人认为上述的方法和属性无疑是控制 table 内容的更好选择。
最后是一则本人的最近引起小骚动的签名档:
一个厕所三个坑——W3C
Related Issues not found
Please contact @jinjiang to initialize the comment
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK