How to duplicate a table row when a button is clicked
<pre><code> &lt;tr id="myid"&gt;
    &lt;td&gt;&lt;input type=textbox id="myid-1" name="myid-1" value="" /&gt;&lt;/td&gt;
    &lt;td&gt;&lt;img src="/images/add.png" /&gt;&lt;/td&gt;
 &lt;/tr&gt;
</code></pre>

<p>I have a row in a table, that has a textbox and an image that is an icon of a '+' sign.</p>

<p>When the user clicks on the '+' icon, I want to create a new duplicate row under this row.
I have to then make sure the id and name attributes are unique.</p>

<p>What's the best way to do this?</p>
