glenelkins Posted February 22, 2008 Share Posted February 22, 2008 Hi Is there a way to clone a node and use a different ID? What is the point cloning an object if it has the same id as the old one? Link to comment https://forums.phpfreaks.com/topic/92432-clonenode/ Share on other sites More sharing options...
nogray Posted February 22, 2008 Share Posted February 22, 2008 You can just assign a different id after you clone the object p = document.getElementById("para1"); p_prime = p.cloneNode(true); p_prime.id = "my_new_id"; Link to comment https://forums.phpfreaks.com/topic/92432-clonenode/#findComment-473755 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.