各位大虾,小弟有关于层中表的问题,急!!!!!!!!
var table;
var cell = null;
var row = null;
//easyLayer 是层的ID
table = createTable("table",easyLayer);
this.table = table;
table.cellSpacing = 1;
table.cellPadding = 1;
thead = createTable("thead", table);
for (var i=0;i<count;i++){
row = createTable("tr", thead);
cell = createTable("td", row);
cell.appendChild(document.createTextNode("SSS"));
}
我想在每次掉用这个函数的时候,把上次显示的去掉,不各位大虾
有什么好办法,先谢谢了!!!
问题点数:20、回复次数:4Top
1 楼zshui(流浪的人)回复于 2003-09-03 21:58:01 得分 0
我用了这个方法,不行,请大虾看看!!!
easyLayer.removeChild(table);Top
2 楼zshui(流浪的人)回复于 2003-09-03 22:03:17 得分 0
function createTable (type, parent) {
var el = null;
el = document.createElement(type);
if (typeof parent != "undefined") {
parent.appendChild(el);
}
return el;
}Top
3 楼cloudchen(cloudchen)回复于 2003-09-03 22:07:18 得分 20
table.removeNode(true)试试
要么试试
table.outerHTML = "";Top
4 楼zshui(流浪的人)回复于 2003-09-03 22:40:20 得分 0
谢谢,谢谢,用你的方法已经解决了.非常感谢.Top



