Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

clone element

var original = document.getElementById("question_format");
var clone = original.cloneNode(true);
clone.removeAttribute("id");
clone.setAttribute("id", "question");
document.getElementById("testform").appendChild(clone);
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #clone #element
ADD COMMENT
Topic
Name
7+7 =