+ 15
The insertAdjacentHTML() method takes text. You are giving a div element to it. So, it is stringified to "[Object HTMLDivElement]". Use insertAdjacentHTML("beforeend",maindiv.outerHTML)
16th Jan 2018, 11:49 AM
Swapnil Srivastava
Swapnil Srivastava - avatar