0

How to append Element in box

I want to create an element witg js so i do var e = document.createElement("div"); document.body.appendChild(e); than, the element is placed after all other elemts inside the body tag. How do i place it inside fe. a div element? Thanks for answers 👌👌

30th Nov 2017, 8:41 PM
StoffelJs
1 Resposta
+ 1
var a=document.getElementByTagName("div"); var e=document.createElement("div"); a[0].appendChild(e);
30th Nov 2017, 9:24 PM
Mohammed Hany
Mohammed Hany - avatar