JavaScript Reference/Javascript Properties/span
"span" Example
<source lang="javascript">
<html> <body>
Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 |
Cell 1 | Cell 2 | Cell 3 | Cell 4 | Cell 5 | Cell 6 |
<input type="button" value="Span" onClick="function1();"> <script language="JavaScript">
document.getElementById("col_1").span = 2; document.getElementById("col_2").span = 3; document.getElementById("col_3").span = 1; function function1() { document.getElementById("col_2").align = "center" document.getElementById("col_2").style.color = "green"; }
</script>
</source>
"span" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<col> <colgroup> | +----------------+--------------------------------------------------------------+
</source>
"span" Syntax and Note
<source lang="javascript">
Note: Read and write property. Specifies the column number in the group, for applying a single style to all columns in the group. This property does not change the rendering of the table.
Syntax:
document.getElementById("elementID").span = value document.all.elementID.span = value // IE only
</source>