Shaofh

Shaofh

增加,删除,移动行; 增加,删除单元格; 行和单元格的索引

 ////////////////////////////////////增加行////////////////////////////////////////////////////
      var newRow;
          newRow=document.all.Dtg1.insertRow(0);
          newcell=newRow.insertCell();
          newcell.innerHTML="AAAAA";

 ////////////////////////////////////刪除行////////////////////////////////////////////////////
    document.all.Dtg1.deleteRow(i+1);

////////////////////////////////////刪除單元格/////////////////////////////////////////////
    document.all.Dtg1.rows[1].deleteCell(0);

////////////////////////////////////移動行/////////////////////////////////////////////////////
   document.all.Dtg1.moveRow(0, 1)

////////////////////////////////////行和單元格的索引///////////////////////////////////////
   this.rowIndex     //this代表行
   this.cellIndex      //this單元格

posted on 2006-05-25 16:22  sh37  阅读(275)  评论(0编辑  收藏  举报

导航