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? Quote Link to comment 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"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.