<table>
<tbody>
<tr>
<td><a onclick="del_1(this);">a1</a></td>
</tr>
<tr>
<td><a onclick="del_1(this)">a2</a></td>
</tr>
</tboby>
<tbody>
<tr>
<td><a onclick="del_1(this)">b1</a></td>
</tr>
<tr>
<td><a onclick="del_2(this)">b2</a></td>
</tr>
</tbody>
</table>
<script>
function del_1(obj){
var tr1 = obj.parentNode.parentNode;
var num = tr1.rowIndex;
var tab2_id = document.getElementById("capital_form2");
tab2_id.deleteRow(num);
}
</script>