caption property (table)
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read-only.
Possible values:
Default: null.
Example HTML code 1:
This example illustrates the use of the caption property:
|
||||
<head> <script type="text/javascript"> function GetCaption () { var table = document.getElementById ("myTable"); alert (table.caption.innerHTML) } </script> </head> <body> <table id="myTable"> <caption>The contents of the caption</caption> <tr> <td>First cell in the table</td> </tr> </table> <button onclick="GetCaption ();">Get the contents of the caption!</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
HTML elements:
Related pages:
External links:
User Contributed Comments