deleteCaption method (table)
If no caption exists on the current table, the deleteCaption method has no effect.
Note: a table element may have more than one caption in Internet Explorer and Opera, and at most one caption in Firefox, Google Chrome and Safari.
Syntax:
You can find the related objects in the Supported by objects section below.
Return value:
This method has no return value.
Example HTML code 1:
This example illustrates the use of the deleteCaption method:
|
||||
<head> <script type="text/javascript"> function RemoveCaption () { var table = document.getElementById ("myTable"); table.deleteCaption (); } </script> </head> <body> <table id="myTable" border="1px"> <caption> <b>Caption for the table.</b> </caption> <tbody> <tr> <td>This text is inside the table.</td> </tr> </tbody> </table> <br /><br /> <button onclick="RemoveCaption ();">Remove the caption!</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
HTML elements:
Related pages:
External links:
User Contributed Comments