create

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

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

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

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

head

英 [hed]? ?美 [h?d]??

n.頭部;頭腦;上端;首腦,首長

vt.用頭頂;前進(jìn);作為…的首領(lǐng);站在…的前頭

vi.朝…行進(jìn);出發(fā);向…方向移動;船駛往

adj.頭的;在前頭的;首要的;在頂端的

第三人稱單數(shù): heads 復(fù)數(shù): heads 現(xiàn)在分詞: heading 過去式: headed 過去分詞: headed

javascript createTHead()方法 語法

作用:用于在表格中獲取或創(chuàng)建 <thead> 元素。

語法:tableObject.createTHead()

返回:返回一個 TableSection,表示該表的 <thead> 元素。如果該表格已經(jīng)有了表頭,則返回它。如果該表沒有表頭,則創(chuàng)建一個新的空 <thead> 元素,把它插入表格,并返回它。

javascript createTHead()方法 示例

<html>
<head>
<script type="text/javascript">
function createCaption()
{
var x=document.getElementById('myTable').createTHead()
x.innerHTML="My table head"
}
</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>

運(yùn)行實(shí)例 ?

點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例