Error when remove value of tag <tr>
<pre><code>jQuery('.chk').click(function(){
   for(var k=0; k&lt;2; k++) {
      deleteRow(k);  
   }                       
});
</code></pre>

<p>And function deleteRow()</p>

<pre><code>function deleteRow(id) {
    var table = document.getElementById("modem_list");
    var rowName = 'row_'+id;
    if (table.rows.namedItem(rowName)) {
        table.deleteRow((table.rows.namedItem(rowName).rowIndex));
    }
}

&lt;table id="modem_list"&gt;
   &lt;tr name="row_1"&gt;Test 1&lt;/tr&gt;
   &lt;tr name="row_2"&gt;Test 2&lt;/tr&gt;
&lt;/table&gt;
&lt;a class="chk" href=""&gt;CLICK&lt;/a&gt;
</code></pre>

<p>When i click is result not delete 2 tag , how to fix it ?</p>
