HTML DOM deleteCaption() Method
Complete Table Object Reference
Definition and Usage
The deleteCaption() method is used to delete a caption element, and its
content, from a table.
Syntax
tableObject.deleteCaption()
|
Example
The following example deletes the table caption:
<html>
<head>
<script type="text/javascript">
function deleteCaption()
{
document.getElementById('myTable').deleteCaption()
}
</script>
</head>
<body>
<table id="myTable" border="1">
<caption>My table caption</caption>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
</tr>
</table>
<br />
<input type="button" onclick="deleteCaption()"
value="Delete caption" />
</body>
</html>
|
Try-It-Yourself Demos
Delete the caption of a table
Complete Table Object Reference
|
|
|