There is an error with the function appendChild
: Node cannot be inserted at the specified point in the hierarchy
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);
Can you please help me?
document.createAttribute()
when i meant to usedocument.createElement()
– Thremmatology