JavaScript Reference/Javascript Methods/deleteCell — различия между версиями

Материал из Web эксперт
Перейти к: навигация, поиск
 
м (1 версия)
 
(нет различий)

Текущая версия на 11:22, 26 мая 2010

"deleteCell()" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript">

   function function1() {
       document.all.myTable.deleteCell(2);
   }

</script>

Cell 1 Cell 2 Cell 3 Cell 4

<input type="button" value="Remove Cell" onclick="function1();"> </body> </html>


     </source>
   
  


"deleteCell()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<tr> | +----------------+--------------------------------------------------------------+

     </source>
   
  


"deleteCell()" Syntax, Parameters and Note

   <source lang="javascript">

Note: This method removes a cell from a table row.

Syntax:

document.getElementById("trID").deleteCell(param1) document.all.trID.deleteCell(param1) // IE only

Parameters:

   param1   Optional; the cell index in the row. 
            If omitted, the last cell in the row will be removed.
   
     
     </source>