轻松上手,快乐学习!

HTML DOM THead 对象


THead 对象

THead 对象代表 HTML <thead> 元素。

访问 THead 对象

您可使用 getElementById() 来访问 <thead> 元素:

实例

var x = document.getElementById("myTHead");
亲自试一试 »

创建 THead 对象

您可使用 document.createElement() 方法来创建 <thead> 元素:

实例

var x = document.createElement("THEAD");
亲自试一试 »

THead 对象属性

属性 描述
align HTML5 不支持。请改用 style.textAlign 。
设置或返回 thead 元素中内容的水平对齐方式。
ch HTML5 不支持。
设置或返回 thead 元素内的对齐字符。
chOff HTML5 不支持。
设置或返回 ch 属性的水平偏移量。
vAlign HTML5 不支持。请改用 style.verticalAlign 。
设置或返回 thead 元素中内容的垂直对齐方式。

标准属性和事件

THead 对象还支持标准 属性 和 事件。


相关页面

HTML 教程: HTML 表格

HTML 参考手册: HTML <thead> 标签