JavaScript Reference/Javascript Properties/axis
"axis" Example
<!--
Example revised from
The Web Programmer"s Desk Reference
by Lazaro Issi Cohen and Joseph Issi Cohen
ISBN: 1593270119
Publisher: No Starch Press 2004
-->
<html>
<body>
<table border="1" summary="Billable time report">
<caption>table caption</caption>
<tr>
<th> </th>
<th id="head1" axis="hours">cell 1</th>
<th id="head2" axis="hours">cell 2</th>
</tr>
<tr>
<th id="a6" axis="name">name</th>
<th> </th>
<th> </th>
<th> </th>
</tr>
<tr>
<td id="a7" axis="date">2004</td>
<td headers="head1 head2">7</td>
<td headers="head1 head2">2</td>
<td> </td>
</tr>
<td id="a7" axis="date">2004</td>
<td headers="head1 head2">9</td>
<td headers="head1 head2">1</td>
<td> </td>
</tr>
<td id="a7" axis="date">2004</td>
<td headers="head1 head2">7</td>
<td headers="head1 head2">1</td>
<td> </td>
</tr>
</table>
<button onclick="alert(head1.axis);">Get the axis for heading 1</button>
</body>
</html>
"axis" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<td> <th> |
+----------------+--------------------------------------------------------------+
"axis" Syntax and Note
Note:
Read and write property.
Categorize <td> and <th> elements.
Value:
Any string.
Syntax:
document.getElementById("elementID").axis = value
document.all.elementID.axis = value // IE only