用法如下: <table id="Sample" caption="This is the sample for tbody."> <thead> <tr><th colspan="3"> Here is the table head!</th></tr> </thead> <tfoot> <tr><th colspan="3"> Here is the table foot!</th></tr> </tfoot> <tbody> <tr><th colspan="3"> Table Body </th></tr> <tr><td>cell 01</td><td>cell 02</td><td>cell 03</td></tr> <tr><td>cell 11</td><td>cell 12</td><td>cell 13</td></tr> </tbody> </table>你可以在IE5+, Netscape6+, Opera 6+来看效果。一般情况你可以不用tbody。但是注意xhtml中的dom,将必须通过显式的tbody 来访问tr和td。意思就是在普通html的浏览器中,你可以当tbody不存在,但将来的xhtml一致的浏览器则不行。
有个小毛病哈,table没有caption属性 加标题得 <caption>This is the sample for tbody</caption>
<table id="Sample" caption="This is the sample for tbody.">
<thead>
<tr><th colspan="3"> Here is the table head!</th></tr>
</thead>
<tfoot>
<tr><th colspan="3"> Here is the table foot!</th></tr>
</tfoot>
<tbody>
<tr><th colspan="3"> Table Body </th></tr>
<tr><td>cell 01</td><td>cell 02</td><td>cell 03</td></tr>
<tr><td>cell 11</td><td>cell 12</td><td>cell 13</td></tr>
</tbody>
</table>你可以在IE5+, Netscape6+, Opera 6+来看效果。一般情况你可以不用tbody。但是注意xhtml中的dom,将必须通过显式的tbody
来访问tr和td。意思就是在普通html的浏览器中,你可以当tbody不存在,但将来的xhtml一致的浏览器则不行。
加标题得
<caption>This is the sample for tbody</caption>