create

英 [kri?e?t]? ?美 [kri?et]??

vt.產(chǎn)生;創(chuàng)造,創(chuàng)作;封爵,把…封為(貴族)

vi.[英][俚]大發(fā)脾氣,大發(fā)牢騷

第三人稱單數(shù): creates 現(xiàn)在分詞: creating 過去式: created 過去分詞: created

caption

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

n.字幕;標(biāo)題,說明文字,字幕;第三檔

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

第三人稱單數(shù): captions 復(fù)數(shù): captions 現(xiàn)在分詞: captioning 過去式: captioned 過去分詞: captioned

javascript createCaption()方法 語法

作用:為表格創(chuàng)建一個 caption 元素。

語法:tableObject.createCaption()
返回:返回一個 HTMLElement 對象,表示該表的 <caption> 元素。如果該表格已經(jīng)有了標(biāo)題,則返回它。如果該表沒有 <caption> 元素,則創(chuàng)建一個新的空 <caption> 元素,把它插入表格,并返回它。

javascript createCaption()方法 示例

<html>
<head>
<script type="text/javascript">
function createCaption()
{
var x=document.getElementById('myTable').createCaption()
x.innerHTML="My table caption"
}
</script>
</head>
<body>

<table id="myTable" border="1">
<tr>
<td>Row1 cell1</td>
<td>Row1 cell2</td>
</tr>
<tr>
<td>Row2 cell1</td>
<td>Row2 cell2</td>
</tr>
</table>
<br />
<input type="button" onclick="createCaption()"
value="Create caption">

</body>
</html>

運行實例 ?

點擊 "運行實例" 按鈕查看在線實例