急,table添加tr一直报错,请教高手,在线等
var table = document.getElementById( "FOLDER ");
var tr = document.createElement( "tr ");
var td = document.createElement( "td ");
var text1 = document.createTextNode( "wwww ");
td.appendChild(text1);
tr.appendChild(td);
table.appendChild(tr);//这行一直报错
错误信息:意外地调用了方法或属性访问
------解决方案--------------------var tr = table.inserRow(table.rows.length);
var td = tr.insertCell(0);
td.innerHTML = "wwww ";