【发布时间】:2012-05-31 10:16:09
【问题描述】:
函数appendChild出错:节点不能插入到层次结构中的指定点
JS:
var abc=document.createElement("div");
abc.style.position="absolute";
abc.style.width="10px";
abc.style.height="10px";
abc.style.left="10px";
abc.style.top="10px";
abc.style.backgroundColor="black";
abc.innerHTML="abc";
document.appendChild(abc);
你能帮帮我吗?
【问题讨论】:
-
万一其他人也有这个问题,我本来打算使用
document.createAttribute()时不小心使用document.createElement()