delete

UK[dɪˈli:t] US[diˈlit]

vt.& vi.Delete

Third person singular: deletes now Participle: deleting Past tense: deleted Past participle: deleted

caption

UK[ˈkæpʃn] US[ˈkæpʃən]

n. Subtitle; title, Description text, subtitles; third file

vt. Add description text to (pictures, photos, etc.); add titles to (documents, etc.); add subtitles to...

Third person singular : captions Plural: captions Present participle: captioning Past tense: captioned Past participle: captioned

javascript deleteCaption() method syntax

Function: Used to delete the caption element and its content of the table.

Syntax: tableObject.deleteCaption()

Description: If the table has a <caption> element, it is extracted from the document tree Delete it. Otherwise, do nothing.

javascript deleteCaption() method example

<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>

Run instance »

Click the "Run instance" button to view the online instance