How to rename HTML elements
<p>I am cloning a table row to create a new row in the table. My problem is that when I clone, all the html elements get the same name as the ones in the previous row. I am using this code:</p>

<pre><code>function incrCapexNode()
{
  var row = document.getElementById("rowToClone"); // find row to copy
  var table = document.getElementById("capex_table"); // find table to append to
  var clone = row.cloneNode(true); // copy children too
  clone.id = "newID"; // change id or other attributes/contents

  table.appendChild(clone); // add new row to end of table
}
</code></pre>

<p>Can you please help me in renaming the html elements in the new row created.</p>
