title: How to update the table when a certain row is deleted using Javascript
body: <p>I want to update the index when the Rows are deleted in the Table.
  For e.g. I delete row 1, then the rows 2 and 3 should become 1 and 2, so on.</p>
  
  <pre><code>function deleteRow(tableID) {
              try {
              var table = document.getElementById(tableID);
              var rowCount = table.rows.length;
  
              for(var i=0; i&lt;rowCount; i++) {
                  var row = table.rows[i];
                  var chkbox = row.cells[0].childNodes[0];
                  if(null != chkbox &amp;&amp; true == chkbox.checked) {
                      table.deleteRow(i);
                      rowCount--;
                      i--;
                  }
  
  
              }
              }catch(e) {
                  alert(e);
              }
          }
  </code></pre>