'cloneNode()' Example : cloneNode « Javascript Methods « JavaScript Reference

'cloneNode()' Example

    
<html>
<body>
<script language="JavaScript">
function function1(){
    var myNode = myButton.cloneNode(true);
    alert(myNode.innerHTML); 
} 
</script>
<button id="myButton" onclick="function1();">Clone node</button>
</body>
</html>

    
      
      








Related examples in the same category

1.'cloneNode()' Syntax, Parameters and Note
2.'cloneNode()' is applied to