+ 1
Can someone send me a JavaScript code implementing the cloneNode property
javascript
2 Respostas
0
The base code are
newnode = node.cloneNode(deep)
Its like a creating a copy of html element(node) for your code, not visible in html thus you can manipulate it the way you wanted because it wont cause any effect to the original element.
deep in the cloneNode parameter is to define wheter you also want to copy all of its childNode or not. I havent find an use it for any of my project so i cant show the implementation
0
I understand that part of the gist. But how is it used in an actual javaScript code.
for instance how do I make the following code run
https://code.sololearn.com/WP4syqeIQzZE/?ref=app