creating a tr programatically after another tr with id using javascript
<p>I have a issue in which I have to create tr's programatically after another tr which has an id to it.I know how to create tr using javascript but not sure how to insert them after a specified tr</p>

<pre><code>&lt;html&gt;
 &lt;head&gt;
  &lt;script type="text/javascript"&gt;
   function insertText ()
   {
       //function to create new  tr after tr with id="tr1"
   }
  &lt;/script&gt;
 &lt;/head&gt;
 &lt;body onload="javascript:insertText()"&gt;
  &lt;table&gt;
&lt;tr&gt;
&lt;/tr&gt;
   &lt;tr id="tr1"&gt;
    &lt;/tr&gt;`
  &lt;/table&gt;
 &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Thanks </p>
