JavaScript Reference/Javascript Methods/deleteCell
Версия от 21:30, 25 мая 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>