JavaScript DHTML/Table/Column
"axis" Example: Group Column
<source lang="html4strict">
<html> <body>
cell 1 | cell 2 | ||
---|---|---|---|
name | |||
2004 | 7 | 2 | 2004 | 9 | 1 | 2004 | 7 | 1 |
<button onclick="alert(head1.axis);">Get the axis for heading 1</button> </body> </html>
</source>
Column span Example
<source lang="html4strict">
<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>