I can not figure out why the text inside the TD is not displayed in IE7. I am frustrated to the core cuz it works in FF! All I am trying to do is dynamically build a table onload... Any help will be greatly appreciated. The complete script is at pastebin
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
User insertRow and insertCell to add Rows and Cells
Ex:
var row = table.insertRow();
row.id= rowid;
var headerCell = row.insertCell();
headerCell.colSpan = colspan;
headerCell.className = "rightAligned";
headerCell.innerHTML = "Header Text";
回答2:
use the insertRow(-1)
to add a row instead, and insertCell(-1)
to add a column
updated code: http://pastebin.com/mTym410P
回答3:
IE needs a TBODY. Just add it as the first child of your table and then append your rows and cells to that.