axis property (td, th)
Sets or retrieves a comma-separated list of category names.
There isn't any functionality implemented for this property in commonly used browsers.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: axis |
Possible values:
String that sets or retrieves a comma-separated list of category names.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the axis attribute:
|
||||
<table border="1px"> <caption>Fruits Cost Report</caption> <tr> <th axis="fruit">Name</th> <th axis="cost">Cost</th> <th axis="piece">Piece</th> </tr> <tr> <td>Apple</td> <td>13.42</td> <td>45</td> </tr> … </table> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the axis property:
|
||||
<head> <script type="text/javascript"> function GetAxis () { var table = document.getElementById ("myTable"); var headCells = table.getElementsByTagName ("th"); for (var i=0; i < headCells.length; i++) { alert ("The contents of the " + (i+1) + ". column axis are :" + headCells[i].axis); } } </script> </head> <body> <table border="1px" id="myTable"> <caption>Fruits Cost Report</caption> <tr> <th axis="fruit">Name</th> <th axis="cost">Cost</th> <th axis="piece">Piece</th> </tr> <tr> <td>Apple</td> <td>13.42</td> <td>45</td> </tr> </table> <button onclick="GetAxis ();">Get Axis</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
External links:
User Contributed Comments