w3pop.com :: ÍøÂçѧԺ :: HTML DOM :: DOM TableRow ¶ÔÏó
InnerHTML of a row
ÐÐÄÚµÄinnerHTML
Align the cell content in a table row
ÔÚ±í¸ñÐÐÄÚ¶ÔÆëµ¥Ôª¸ñÄÚÈÝ
Vertical align the cell content in a table row
±í¸ñÐÐÄÚµ¥ÔªÄÚÈݵĴ¹Ö±¶ÔÆë
Align the cell content in a single cell
½ö¶ÔÒ»¸öµ¥ÔªÄÚÈݽøÐÐ¶ÔÆë
Vertical align the cell content in a single cell
½ö¶ÔÒ»¸öµ¥ÔªÄÚÈݽøÐд¹Ö±¶ÔÆë
Change the content of a table cell
¸Ä±ä±í¸ñµ¥ÔªµÄÄÚÈÝ
Change the colspan of a table row
¸Ä±ä±í¸ñÐеÄcolspanÊôÐÔÖµ
The TableRow object represents an HTML table row element. For each instance of an HTML <tr> tag in a document, a TableRow object is created.
TbaleRow¶ÔÏó´ú±íÁËHTML±í¸ñÖеÄrowÔªËØ¡£Ã¿µ±HTMLÎĵµÖгöÏÖ<tr>±êÇ©£¬Ò»¸öTableRow¶ÔÏó¾Í½¨Á¢ÆðÀ´ÁË
IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).
| Collection ¼¯ºÏ |
Description ÃèÊö |
IE | F | N | W3C |
|---|---|---|---|---|---|
| cells[] | Returns an array containing each column in the table row ·µ»Ø±í¸ñÐÐÖаüº¬Ã¿¸öÁеÄÊý×é |
4 | Yes |
| Property ÊôÐÔ |
Description ÃèÊö |
IE | F | N | W3C |
|---|---|---|---|---|---|
| accessKey | Sets or returns the keyboard key to access the table row ÉèÖûò·µ»Ø·ÃÎʱí¸ñÐеĿì½Ý¼ü |
5 | No | ||
| align | Sets or returns the horizontal alignment of data within cells of the table row ÉèÖûò·µ»Ø±í¸ñÐе¥ÔªÄÚÊý¾ÝµÄ¶ÔÆë·½Ê½ |
4 | Yes | ||
| bgColor | Sets or returns the background color for the table row ÉèÖûò·µ»Ø±í¸ñÐеı³¾°ÑÕÉ« |
4 | Yes | ||
| borderColor | Sets or returns the border color of the table row ÉèÖûò·µ»Ø±í¸ñÐеı߿òÑÕÉ« |
4 | No | ||
| ch | Sets or returns the alignment character for cells in the table row ÉèÖûò·µ»Ø±í¸ñÐе¥ÔªµÄ¶ÔÆëÌØÕ÷ |
6 | Yes | ||
| chOff | Sets or returns the offset of alignment character for cells in the table row ÉèÖûò»ñÈ¡¿ÉÓÃÓÚʵÏÖ¶ÔÏóµÄÄã×Ô¼ºµÄ chOff ¹¦ÄܵÄ×Ö·û´®¡£ |
6 | Yes | ||
| disabled | Sets or returns whether or not the table row should be disabled ÉèÖûò»ñÈ¡¿Ø¼þµÄ״̬¡£ |
5 | No | ||
| height | Sets or returns the height of the table row »ñÈ¡»òÉèÖñí¸ñÐеŤ×÷ÇøÓò¸ß¶È |
5 | No | ||
| id | Sets or returns the id of the table row (In IE 4 this property is read-only) ÉèÖûò·µ»Ø±í¸ñÐеÄid |
4 | No | ||
| innerHTML | Sets or returns the HTML between the start and end tags of the table row ÉèÖûò·µ»ØÔÚ±í¸ñÐбêǩ֮¼äµÄHTMLÄÚÈÝ |
5 | No | ||
| innerText | Sets or returns the text between the start and end tags of the table row ÉèÖûò·µ»ØÔÚ±í¸ñÐбêǩ֮¼äµÄÎÄ×ÖÄÚÈÝ |
5 | No | ||
| outerHTML | Sets or returns the table row object and its content in HTML ÉèÖûò»ñÈ¡±í¸ñÐжÔÏó¼°ÆäÄÚÈÝµÄ HTML ÐÎʽ¡£ |
4 | No | ||
| outerText | Sets or returns the text of the table row object ÉèÖûò»ñÈ¡±í¸ñÐжÔÏóµÄÎı¾¡£ |
4 | No | ||
| rowIndex | Returns the table row object's position in the rows collection for the table ·µ»Ø±í¸ñÐжÔÏóÔÚ±íµ¥Ðм¯ÖеÄλÖà |
4 | Yes | ||
| sectionRowIndex | Returns the table rows object's position in the tBody, tHead, or tFoot rows collection ·µ»Ø±í¸ñÐжÔÏóÔÚtBody, tHead, »ò tFoot rows ¼¯ºÏÖеÄλÖà |
4 | Yes | ||
| tabIndex | Sets or returns the tab order for the table row Ϊ±í¸ñÐÐÉèÖûò·µ»Øtab˳Ðò |
5 | No | ||
| vAlign | Sets or returns how cell content are vertically aligned within the table row ÉèÖûò·µ»ØÔÚ±í¸ñÐÐÖе¥ÔªÄÚÈÝÈçºÎ´¹Ö±¶ÔÆë |
4 | Yes | ||
| width | Sets or returns the width of the table row ÉèÖûò·µ»Ø±í¸ñÐеĿí¶È |
4 | No |
| Method ·½·¨ |
Description ÃèÊö |
IE | F | N | W3C |
|---|---|---|---|---|---|
| blur() | Removes focus from the table row ´Ó±í¸ñÐÐÖÐÈ¡Ïû½¹µã |
4 | No | ||
| click() | Simulates a mouse-click on the table row Ä£·ÂÊó±ê¶Ô±í¸ñÐеĵã»÷ |
4 | No | ||
| deleteCell([i]) | Deletes a cell in the table row ɾ³ý±í¸ñÖеÄij¸öµ¥Ôª |
4 | Yes | ||
| focus() | Sets focus on the table row Èñí¸ñÐеõ½½¹µã |
5 | No | ||
| insertCell() | Inserts a new table cell in the table row ÔÚ±í¸ñÐÐÖвåÈëеıí¸ñµ¥Ôª |
4 | Yes |
Syntax: object.event_name="someJavaScriptCode"
Óï·¨£º¶ÔÏó.ʼþÃû³Æ=“һЩJS´úÂë”
| Event ʼþ |
Description ÃèÊö |
IE | F | N | W3C |
|---|---|---|---|---|---|
| onBlur | Executes some code when the table row loses focus µ±±í¸ñÐÐʧȥ½¹µãµÄʱºòÖ´ÐÐһЩ´úÂë |
4 | |||
| onClick | Executes some code when the user clicks on the table row µ±Óû§µã»÷Á˱í¸ñÐеÄʱºòÖ´ÐÐһЩ´úÂë |
4 | |||
| onFocus | Executes some code when the table row gets focus µ±±í¸ñÐеõ½½¹µãµÄʱºòÖ´ÐÐһЩ´úÂë |
4 | |||
| onSelectStart | Executes some code when the table row is selected µ±±íºÍÐб»Ñ¡ÖеÄʱºòÖ´ÐÐһЩ´úÂë |
4 |
ÆÀÂÛ (0)
All