6 Answers
New AnswerI can clone a tag of HTML. Here is the code: https://code.sololearn.com/WA19a23a7A9a Now I need to modify only the cloned tag. How can I do that? Thanks in advance.
5/16/2021 2:42:04 PM
The future is now thanks to science[In a break]6 Answers
New AnswerIf you want to change the position where the cloned tag is inserted, you can use other methods like prepend (), insertAdjacentElement (), etc.
Avinesh , I mean using top,left,bottom ,right to position the element .
Try this 😜 var myDiv = document.getElementById("test").cloneNode(true); myDiv.append(" cloned") document.body.prepend(myDiv);
@Eze sorry for asking but can you please give an example as I don't know the use of those tags?
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message