javascript - How to create a copy of a form with its DOM elements -


how 1 create copy of form of form elements copy can manipulated , original left unchanged?

using plain javascript clonenode

 var dupnode = node.clonenode(deep); 

example

 var p = document.getelementbyid("para1"), var p_prime = p.clonenode(deep);  //if "deep" set true clone child nodes too, //if set false node , not children 

here documentation.

hope helps.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -