javascript - Clone a Div Multiple Times -


Please be gentle, I'm just learning I'm trying to clone a div several times I do it once I want to, but not many times I want to w / out JQuery (the original Javascript is trying to understand first). Below is a sample what am I doing?

  var myDiv = document.getElementById ("test"); Var divClone = myDiv.cloneNode (true); // is for true dark cloning documents. A.de.appendChild (divClone); Document.body.appendChild (divClone); Document.body.appendChild (divClone);       

"text">

You need to clone it every time.

  var myDiv = document.getElementById ("test"); Document.body.appendChild (myDiv.cloneNode (true)); Document.body.appendChild (myDiv.cloneNode (true)); Document.body.appendChild (myDiv.cloneNode (true));  


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -