<thead> 是“頭”標籤,<tbody> 是“體”標籤,<tfoot> 是“腳註”標籤。用它們可以把表格的標頭、表格體、腳註進行分組(行分組),便於分別控制它們的外觀。
<TBODY>...</TBODY>
用法: 定義一個表格的實體
開始/結束標識: 可選/可選
屬性: %coreattrs,%i18n,%events
align="..."設置水平方向上單元各種內容的對齊方式(left,center,right,justify)
char="..."設置一個字符,時的該列都向它對齊
charoff="..."取消把一行的對齊方式設置爲向第一個字符對齊
valign="..."豎直方向上單元中內容的對齊方式(top,middle,bottom,baseline)
空: 不允許
---------------------------------------------------------------
Designates rows as the body of the table.
Show HTML Syntax
<TBODY
ALIGN=CENTER ¦ LEFT ¦ RIGHT
BGCOLOR=color
CLASS=classname
ID=value
LANG=language
LANGUAGE=javascript ¦ JSCRIPT ¦ VBSCRIPT ¦ VBS
STYLE=css1-properties
TITLE=text
VALIGN=BASELINE ¦ BOTTOM ¦ CENTER ¦ TOP
event = script
>
Remarks
Valid tags within the TBODY element include:
TD
TH
TR
This element is exposed for all tables, even if the table does not explicitly define a TBODY element.
The TBODY element is a block element and requires a closing tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script as of Internet Explorer 4.0.
---------------------------------------------------------------
把表主體分成不同的部分。
---------------------------------------------------------------
呵呵,那麼多洋文。
表格的dom結構象這樣的:
<table>
<thead>
<tr>
<td>表頭</td>
</tr>
</thead>
<tbody>
<tr>
<td>表體</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>表腳</td>
</tr>
</tfoot>
</table>
如果只有一個tbody的時候經常不寫tbody,但是其實這個對象還是存在的,alert一下table的innerHTML就可以看見了。
---------------------------------------------------------------
<tbody>的好處就是可以先顯示<tbody></tbody>之間的內容,
而不必等整個表格都下載完成後再顯示,
這對於那些喜歡用表格來排版式網頁的人來說尤其重要,
不然的話, 用戶半天沒看到反應就會以爲該網頁出錯了.
---------------------------------------------------------------
<thead><tbody><tfoot>無論前後順序如何改變,<thead>內的元素總是在表的最上面,<tfoot>總在表的最下面,所以
<table>
<tfoot>
<tr>
<td>表腳</td>
</tr>
</tfoot>
<thead>
<tr>
<td>表頭</td>
</tr>
</thead>
<tbody>
<tr>
<td>表體</td>
</tr>
</tbody>
</table>
與上面的sorce運行結果是一樣的。
---------------------------------------------------------------
它是表格的正文部分,就像HTML的<body>一樣.