delete

英[d??li:t]? ?美[di?lit]??

vt.& vi.刪除

第三人稱(chēng)單數(shù): deletes 現(xiàn)在分詞: deleting 過(guò)去式: deleted 過(guò)去分詞: deleted

caption

英[?k?p?n]? ?美[?k?p??n]??

n.字幕;說(shuō)明文字,字幕;第三檔

vt.給(圖片、照片等)加說(shuō)明文字;在(文件等)上加標(biāo)題;在…上加字幕

第三人稱(chēng)單數(shù): captions 複數(shù): captions 現(xiàn)在分詞: captioning 過(guò)去式: captioned 過(guò)去分詞: captioned

javascript deleteCaption() 方法 語(yǔ)法

作用:用於刪除表格的 caption 元素及其內(nèi)容。

語(yǔ)法:tableObject.deleteCaption()

#說(shuō)明:如果該表有<caption> 元素,則從文件樹(shù)種刪除它。否則,什麼都不做。

javascript deleteCaption() 方法 範(fàn)例

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

執(zhí)行實(shí)例 ?

點(diǎn)擊 "執(zhí)行實(shí)例" 按鈕查看線上實(shí)例