函数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()
。 - MoralCode