選択した行を削除したいと思います。rowspan とその下の余分な行、合計 4 行です。行の 4 つのスタックがそれぞれ 1 つのエントリを表していることがわかります。以下の関数 deleteSelectedRows() は正しく機能しません。選択したものだけが削除されます。助けてください!
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<table  id="my_table" id="my_table" align="center" width="100%" border="1" cellpadding="0" cellspacing="0">
    <tbody>
    <thead>
      <tr>
        <th >No</th>
        <th >Location</th>
        <th >Time</th>
      </tr>
      <tr> <!-- new entry #1 -->
        <td rowspan="3"><input type="checkbox">1a<td>
        <td>1a</td>
      </tr>
      <tr>
        <td>2a</td>
        <td>2a</td>
      </tr>
      <tr>
        <td>3a</td>
        <td>3a</td>
      </tr>
      <tr >
        <td colSpan="3">4a</td>
      </tr>
      <tr> <!-- new entry #2-->
        <td rowspan="3"><input type="checkbox">1b<td>
        <td>1b</td>
      </tr>
      <tr>
        <td>2b</td>
        <td>2b</td>
      </tr>
      <tr>
        <td>3b</td>
        <td>3b</td>
      </tr>
      <tr >
        <td colSpan="3">4b</td>
      </tr>
     </thead></tbody>
    </table>
    <div><input type="button" value="Delete selected rows" onClick="deleteSelectedRows()"/></div>
</body>
</HTML>
   <SCRIPT language="javascript">
    function deleteSelectedRows() {    
     var table = document.getElementById('my_table'); //html table
     var rowCount = table.rows.length; //no. of rows in table          
     for(var i=0; i< rowCount; i++) { //loops for all row in table 
      var row = table.rows[i]; //return a particular row              
      var chkbox = row.cells[0].childNodes[0]; //get check box onject               
      if(null != chkbox && true == chkbox.checked) { //wheather check box is selected                   
       table.deleteRow(i); //delete the selected row   
       rowCount = rowCount-1; //decrease rowcount by 1                   
       i--;               
      }             
     }
    }
</script>