DOM TableHeader 对象

本文详细介绍了HTML中的TableHeader对象,包括其属性、方法和事件等内容。TableHeader对象用于表示HTML表格中的表头单元格,文章列举了多个属性如align、colSpan等,并解释了它们的功能。

TableHeader 对象

The TableHeader object represents an HTML table header element. For each instance of an HTML <th> tag in a document, a TableHeader object is created.
TableHeader对象代表了HTML表格的header元素。每当HTML文档中出现<th>标签就有一个TableHeader对象被建立起来

IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).

TableHeader 对象属性

Property
属性
Description
描述
IE FNW3C
abbrSets or returns an abbreviated text for the table header cell (for non-visual media such as speech or Braille)
设置或返回表格header单元的缩写文字
6  Yes
accessKeySets or returns the keyboard key to access the table header cell
设置或返回访问表格header单元的快捷键
5  No
alignSets or returns the horizontal alignment of data within the table header cell
设置或返回表格header单元内的数据的水平对齐方式
4  Yes
axisSets or returns a comma-delimited list of related table header cells (categories)6  Yes
backgroundSets or returns the background image for the table header cell
设置或返回表格header单元的背景图片
4  No
bgColorSets or returns the background color for the table header cell
设置或返回表格header单元的背景颜色
4  Yes
borderColorSets or returns the border color of the table header cell
设置或返回表格header单元的边框颜色
4  No
cellIndexReturns the position of the cell in the cells collection of a row
返回行中单元集合里单元格的位置
4  Yes
chSets or returns the alignment character for the table header cell
设置或返回表格header单元对齐特征
6  Yes
chOffSets or returns the offset of alignment character for the table header cell6  Yes
colSpanSets or returns the number of columns the table header cell should span4  Yes
headersSets or returns a list of space-separated header cell ids6  Yes
heightSets or returns the height of the table header cell4  No
idSets or returns the id of the table header cell (In IE 4 this property is read-only)4  No
innerHTMLSets or returns the HTML between the start and end tags of the table header cell4  No
innerTextSets or returns the text between the start and end tags of the table header cell4  No
noWrapSets or returns a Boolean value indicating whether or not the browser automatically performs word wrap in the table header cell4  Yes
outerHTMLSets or returns the table header object and its content in HTML4  No
outerTextSets or returns the text of the table header object4  No
rowSpanSets or returns the number of rows the table header cell should span4  Yes
scope 6  Yes
tabIndexSets or returns the tab order for the table header cell5  No
vAlignSets or returns how header cell content are vertically aligned4  Yes
widthSets or returns the width of the table header cell4  Yes

TableHeader 对象方法

Method
方法
Description
描述
IEFNW3C
blur()Removes focus from the table header cell
删除表格header单元的焦点
5  No
click()Simulates a mouse-click on the table header cell
模仿鼠标点击表格header单元
4  No
focus()Sets focus on the table header cell
为表格header单元设置焦点
5  No

TableHeader 对象事件

Syntax: object.event_name="someJavaScriptCode"
语法:对象.事件名称=“一些JS代码”

Event
事件
Description
描述
IEFNW3C
onBlurExecutes some code when the table header cell loses focus
当表格header单元失去焦点的时候执行一些代码
5   
onClickExecutes some code when the user clicks on the table header cell
当用户点击表格header单元就执行一些代码
4   
onFocusExecutes some code when the table header cell gets focus
当表格header单元得到焦点就执行一些代码
5   
onSelectStartExecutes some code when the table header cell is selected
当表格header单元被选中则执行一些代码
4   
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值