html+table+dom+结构,HTML DOM

HTML DOM TableRow Object

TableRow Object

The TableRow object represents an HTML

element.

Access a TableRow Object

You can access a

element by using getElementById():

var x = document.getElementById("myTr");

Try it

Tip: You can also access a

element by searching through the rows collection of a table.

Create a TableRow Object

You can create a

element by using the document.createElement() method:

var x = document.createElement("TR");

Try it

TableRow Object Collections

Collection

Description

Returns a collection of all

or elements in a table

row

TableRow Object Properties

Property

Description

align

Not supported in HTML5. Use style.textAlign instead.

Sets or returns the horizontal alignment of the content within a table row

bgColor

Not supported in HTML5. Use style.backgroundColor instead.

Sets or returns the background color of a table row

ch

Not supported in HTML5.

Sets or returns an alignment character for cells in a

table row

chOff

Not supported in HTML5.

Sets or returns the horizontal offset of the ch property

height

Not supported in HTML5. Use style.height instead.

Sets or returns the height of a table row.

Returns the position of a row in the rows

collection of a table

Returns the position of a row in the rows

collection of a tbody,

thead, or tfoot

vAlign

Not supported in HTML5. Use

style.verticalAlign instead.

Sets or returns the vertical alignment of the content within a

table row

TableRow Object Methods

Method

Description

Deletes a cell from the current table row

Inserts a cell into the current table row

Standard Properties and Events

The TableRow object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Tables

HTML reference: HTML

tag
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值