Package | dom.html |
Class | public class HTMLTableElement |
Inheritance | HTMLTableElement HTMLElement Element Node Object |
Property | Defined By | ||
---|---|---|---|
align : DOMString
Specifies the table's position with respect to the rest of the document. | HTMLTableElement | ||
DOM 1 Core attributes : NamedNodeMap [read-only]
Returns an unordered collection of Attr nodes. | Node | ||
Non-Standard baseName : DOMString [read-only]
Returns the base name for the name qualified with the namespace. | Node | ||
DOM 3 Core baseURI : DOMString [read-only]
The absolute base URI of this node or null if the implementation
wasn't able to obtain an absolute URI. | Node | ||
baseURIObject : nsIURI [read-only]
Non-Standard | FireFox 3+
Returns the nsIURI object representing the element's URI. | Element | ||
bgColor : DOMString
Cell background color. | HTMLTableElement | ||
border : DOMString
The width of the border around the table. | HTMLTableElement | ||
caption : HTMLTableCaptionElement
Modified in DOM Level 2
Returns the table's CAPTION, or void if none exists. | HTMLTableElement | ||
cellPadding : DOMString
Specifies the horizontal and vertical space between cell content and cell borders. | HTMLTableElement | ||
cellSpacing : DOMString
Specifies the horizontal and vertical separation between cells. | HTMLTableElement | ||
Element Traversal childElementCount : Number [read-only]
Returns the current number of element nodes that are children of this
element. | Element | ||
DOM 1 Core childNodes : NodeList [read-only]
Returns an ordered collection of node objects that are children of
the current element. | Node | ||
children : NodeList [read-only]
? | FireFox 3.5+
Returns a collection of child elements of the given element. | Element | ||
className : DOMString
The class attribute of the element. | HTMLElement | ||
DOM 3 Core clientHeight : Number [read-only]
Returns the inner height of an element in pixels, including padding but not the horizontal scrollbar height, border, or margin. | Element | ||
DOM 3 Core clientLeft : Number [read-only]
The width of the left border of an element in pixels. | Element | ||
DOM 3 Core clientTop : Number [read-only]
The width of the top border of an element in pixels. | Element | ||
DOM 3 Core clientWidth : Number [read-only]
Returns the inner width of an element in pixels. | Element | ||
Non-Standard dataType : *
Specifies the data type for this node. | Node | ||
Non-Standard definition : Node [read-only]
Returns the definition of the node in the document type definition (DTD) or schema. | Node | ||
dir : DOMString
The dir attribute gets or sets the text writing directionality of
the content of the current element. | HTMLElement | ||
DOM 1 Core firstChild : Node [read-only]
Returns the node's first child in the tree, or null if the node is
childless. | Node | ||
Element Traversal firstElementChild : Element [read-only]
Returns the first child element node of this element. | Element | ||
frame : DOMString
Specifies which external table borders to render. | HTMLTableElement | ||
id : DOMString
Gets or sets the element's identifier. | HTMLElement | ||
innerHTML : DOMString
DOM Level 0 | NS\FireFox\IE4+
Sets or gets all of the markup and content within a given element. | Element | ||
lang : DOMString
This property gets or sets the base language of an element's attribute
values and text content. | HTMLElement | ||
DOM 1 Core lastChild : Node [read-only]
Returns the last child of a node. | Node | ||
Element Traversal lastElementChild : Element [read-only]
Returns the last child element node of this element. | Element | ||
DOM 2 Core localName : DOMString [read-only]
Returns the local part of the qualified name of this node. | Node | ||
DOM 2 Core namespaceURI : DOMString [read-only]
The namespace URI of the node, or null if it is unspecified (read-only). | Node | ||
Element Traversal nextElementSibling : Element [read-only]
Returns the next sibling element node of this element. | Element | ||
DOM 1 Core nextSibling : Node [read-only]
Returns the node immediately following the specified one in its
parent's childNodes list, or null if the specified node is the
last node in that list. | Node | ||
DOM 1 Core nodeName : DOMString [read-only]
Returns the name of the current node as a string. | Node | ||
Non-Standard nodePrincipal : nsIPrincipal [read-only]
Returns the nsIPrincipal object representing current security
context of the node. | Node | ||
DOM 1 Core nodeType : Number [read-only]
Returns an integer code representing the type of the node. | Node | ||
Non-Standard nodeTypedValue : *
Contains the node value expressed in its defined data type. | Node | ||
Non-Standard nodeTypeString : DOMString [read-only]
Returns the node type in string form. | Node | ||
DOM 1 Core nodeValue : DOMString
Returns or sets the value of the current node. | Node | ||
DOM 3 Core offsetHeight : Number [read-only]
Height of an element relative to the element's offsetParent. | Element | ||
DOM 3 Core offsetLeft : Number [read-only]
Returns the number of pixels that the upper left corner of the current
element is offset to the left within the offsetParent node. | Element | ||
DOM 3 Core offsetParent : Element [read-only]
The element from which all offset calculations are currently computed. | Element | ||
DOM 3 Core offsetTop : Number [read-only]
Returns the distance of the current element relative to the
top of the offsetParent node. | Element | ||
DOM 3 Core offsetWidth : Number [read-only]
The width of an element, relative to the layout. | Element | ||
onclick : Function
a pointer button was clicked
| HTMLElement | ||
oncopy : Function
Non-Standard | Firefox 3+
This event is sent when the user attempts to copy text. | HTMLElement | ||
oncut : Function
Non-Standard | Firefox 3+
This event is sent when the user attempts to cut text. | HTMLElement | ||
ondblclick : Function
a pointer button was double clicked
| HTMLElement | ||
onkeydown : Function
a key was pressed down
| HTMLElement | ||
onkeypress : Function
a key was pressed and released
| HTMLElement | ||
onkeyup : Function
a key was released
| HTMLElement | ||
onmousedown : Function
a pointer button was pressed down
| HTMLElement | ||
onmousemove : Function
a pointer was moved within
| HTMLElement | ||
onmouseout : Function
a pointer was moved away
| HTMLElement | ||
onmouseover : Function
a pointer was moved onto
| HTMLElement | ||
onmouseup : Function
a pointer button was released
| HTMLElement | ||
onpaste : Function
Non-Standard | Firefox 3+
This event is sent when the user attempts to paste text. | HTMLElement | ||
DOM 1 Core ownerDocument : Document [read-only]
The Document object associated with this node. | Node | ||
DOM 1 Core parentNode : Node [read-only]
Returns the parent of the specified node in the DOM tree. | Node | ||
Non-Standard parsed : Boolean [read-only]
Indicates the parsed status of the node and child nodes. | Node | ||
DOM 2 Core prefix : DOMString
Returns the namespace prefix of the specified node, or null if no
prefix is specified. | Node | ||
Element Traversal previousElementSibling : Element [read-only]
Returns the previous sibling element node of this element. | Element | ||
DOM 1 Core previousSibling : Node [read-only]
Returns the node immediately preceding the specified one in its
parent's childNodes list, null if the specified node is the first
in that list. | Node | ||
rows : HTMLCollection [read-only]
Returns a collection of all the rows in the table, including all in THEAD, TFOOT, all TBODY elements. | HTMLTableElement | ||
rules : DOMString
Specifies which internal table borders to render. | HTMLTableElement | ||
schemeTypeInfo : TypeInfo [read-only]
DOM Level 3 | None
The type information associated with this element. | Element | ||
DOM 3 Core scrollHeight : Number [read-only]
Height of the scroll view of an element; it includes the element padding but not its margin. | Element | ||
DOM 3 Core scrollLeft : Number
Gets or sets the number of pixels that an element's content is scrolled to the left. | Element | ||
DOM 3 Core scrollTop : Number
Gets or sets the number of pixels that the content of an element is scrolled upward. | Element | ||
DOM 3 Core scrollWidth : Number [read-only]
Returns either the width in pixels of the content of an element or the width of the element itself, whichever is greater. | Element | ||
Non-Standard specified : Boolean [read-only]
Indicates whether the node (usually an attribute) is explicitly specified or derived
from a default value in the document type definition (DTD) or schema. | Node | ||
style : CSSStyleDeclaration [read-only]
Returns an object that represents the element's style attribute. | HTMLElement | ||
summary : DOMString
Description about the purpose or structure of a table. | HTMLTableElement | ||
DOM 2 Core tagName : DOMString [read-only]
The name of the element. | Element | ||
tBodies : HTMLCollection
Returns a collection of the table bodies (including implicit ones). | HTMLTableElement | ||
Non-Standard text : DOMString
Represents the text content of the node or the concatenated text representing the node and its descendants. | Node | ||
DOM 3 Core textContent : DOMString
Gets or sets the text content of a node and its descendants. | Node | ||
tFoot : HTMLTableSectionElement
Modified in DOM Level 2
Returns the table's TFOOT, or null if none exists. | HTMLTableElement | ||
tHead : HTMLTableSectionElement
Modified in DOM Level 2
Returns the table's THEAD, or null if none exists. | HTMLTableElement | ||
title : DOMString
Establishes the text to be displayed in a 'tool tip' popup when the
mouse is over the displayed node. | HTMLElement | ||
width : DOMString
Specifies the desired table width. | HTMLTableElement | ||
Non-Standard xml : DOMString [read-only]
Contains the XML representation of the node and all its descendants. | Node |
Method | Defined By | ||
---|---|---|---|
Attaches a behavior to the element. | Element | ||
Associates a function with a particular event and binds the event to the current node. | Node | ||
DOM 3 Events addEventListenerNS(namespaceURI:DOMString, type:DOMString, listener:EventListener, useCapture:Boolean):void
Registers an event listener, depending on the useCapture parameter, on the
capture phase of the DOM event flow or its target and bubbling phases. | Node | ||
Adds a node to the end of the list of children of a specified parent node. | Node | ||
Makes the element either a child or parent of another element. | Element | ||
Binds the specified function to an event, so that the function gets called whenever
the event fires on the object. | Element | ||
Non-Standard clearAttributes():void
Removes all attributes and values from the object. | Element | ||
Returns a duplicate of the current node. | Node | ||
Compares the position of the current node against another node in any other document. | Node | ||
Returns the component located at the specified coordinates via certain events. | Element | ||
Non-Standard contains(element:Object):Boolean
Checks whether the given element is contained within the object. | Element | ||
Create a new table caption object or return an existing one. | HTMLTableElement | ||
Creates a controlRange collection of nontext elements. | Element | ||
Create a table footer row or return an existing one. | HTMLTableElement | ||
Create a table header row or return an existing one. | HTMLTableElement | ||
deleteCaption():void
Delete the table caption, if one exists. | HTMLTableElement | ||
deleteRow(index:Number):void
Delete a table row. | HTMLTableElement | ||
deleteTFoot():void
Delete the footer from the table, if one exists. | HTMLTableElement | ||
deleteTHead():void
Delete the header from the table, if one exists. | HTMLTableElement | ||
Unbinds the specified function from the event, so that the function stops receiving notifications when the event fires. | Element | ||
Dispatches an event to fire on a node artificially. | Node | ||
Simulates a click on a scroll-bar component. | Element | ||
Non-Standard dragDrop():Boolean
Initiates a drag event. | Element | ||
Fires a specified event on the object. | Element | ||
Returns the adjacent text string. | Element | ||
Returns the value of the named attribute on the specified element. | Element | ||
Returns the Attr node for the attribute with the given name. | Element | ||
Returns the Attr node for the attribute with the given namespace and name. | Element | ||
Returns the string value of the attribute with the specified namespace and name. | Element | ||
Retrieves an object that specifies the bounds of a collection of TextRectangle objects. | Element | ||
Retrieves a collection of rectangles that describes the layout of the
contents of an object or range within the client. | Element | ||
Returns a set of elements with the given class name. | Element | ||
Retrieves a collection of objects based on the specified element name. | Element | ||
Returns a list of elements with the given tag name belonging to the given namespace. | Element | ||
Retrieves the expression for the given property. | Element | ||
This method returns a specialized object which implements the
specialized APIs of the specified feature and version, as specified
in DOM Features. | Node | ||
Retrieves the object associated to a key on a this node. | Node | ||
DOM Level 2 | NS\FireFox
Determines whether an attribute with the specified name exists. | Element | ||
Returns a boolean value indicating whether the current element has the specified attribute. | Element | ||
DOM 2 Core hasAttributes():Boolean
Returns a boolean value of true or false, indicating if the current element
has any attributes or not. | Node | ||
DOM 1 Core hasChildNodes():Boolean
Returns a value that indicates whether the object has children. | Node | ||
Inserts an element at the specified location. | Element | ||
Inserts the given HTML text into the element at the location. | Element | ||
Inserts the given text into the element at the specified location. | Element | ||
Inserts the specified node before a reference element as a child of
the current node. | Node | ||
insertRow(index:Number):HTMLElement
Insert a new empty row in the table. | HTMLTableElement | ||
Returns true if the namespace is the default namespace on the given
node or false if not. | Node | ||
Tests whether two nodes are equal. | Node | ||
Returns whether this node is the same node as the given one. | Node | ||
Tests whether the DOM implementation implements a specific feature
and that feature is supported by this node. | Node | ||
Takes a prefix and returns the namespaceURI associated with it on the
given node if found (and null if not). | Node | ||
Returns the prefix for a given namespaceURI if present, and null if not. | Node | ||
Copies all read/write attributes to the specified element. | Element | ||
DOM 1 Core normalize():void
Puts the specified node and all of its subtree into a "normalized"
form. | Node | ||
Returns the first element that is a descendent of the element on which it is invoked that matches the specified group of selectors. | Element | ||
Returns a list of all elements descended from the element on which it is invoked that match the specified group of selectors. | Element | ||
Non-Standard releaseCapture():void
Removes mouse capture from the object in the current document. | Element | ||
Removes an attribute from the specified element. | Element | ||
Removes an attribute object from the object. | Element | ||
Removes the specified attribute from an element. | Element | ||
Non-Standard removeBehavior(id:Number):Boolean
Detaches a behavior from the element. | Element | ||
Removes a child node from the object. | Node | ||
Removes an event listener. | Node | ||
DOM 3 Events removeEventListenerNS(namespaceURI:DOMString, type:DOMString, listener:EventListener, useCapture:Boolean):void
Removes an event listener. | Node | ||
Removes the expression from the specified property. | Element | ||
Removes the object from the document hierarchy. | Element | ||
Replaces the text adjacent to the element. | Element | ||
Replaces an existing child element with a new child element. | Node | ||
Replaces the object with another element. | Element | ||
DOM 0 scrollIntoView(alignToTop:Boolean = true):void
Causes the object to scroll into view, aligning it either at the top
or bottom of the window. | Element | ||
Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes as IXMLDOMNodeList. | Node | ||
Applies the specified pattern-matching operation to this node's context and returns the first matching node. | Node | ||
Non-Standard setActive():void
Sets the object as active without setting focus to the object. | Element | ||
Sets the value of the specified attribute. | Element | ||
Sets an attribute object node as part of the object. | Element | ||
Adds a new attribute node with the specified namespace and name. | Element | ||
Adds a new attribute or changes the value of an attribute with the
given namespace and name. | Element | ||
Non-Standard setCapture(containerCapture:Boolean = true):void
Sets the mouse capture to the object that belongs to the current document. | Element | ||
Sets an expression for the specified object. | Element | ||
If the parameter isId is true, this method declares the specified
attribute to be a user-determined ID attribute. | Element | ||
If the parameter isId is true, this method declares the specified attribute
to be a user-determined ID attribute. | Element | ||
If the parameter isId is true, this method declares the specified
attribute to be a user-determined ID attribute. | Element | ||
Associate an object to a key on this node. | Node | ||
Exchanges the location of two objects in the document hierarchy. | Element | ||
Processes this node and its children using the supplied Extensible Stylesheet Language Transformations
(XSLT) style sheet and returns the resulting transformation. | Node | ||
Processes this node and its children using the supplied Extensible Stylesheet Language Transformations (XSLT) style sheet
and returns the resulting transformation. | Node |
align | property |
align:DOMString
Specifies the table's position with respect to the rest of the document. This attribute is deprecated in HTML 4.01.
Valid values are:
public function get align():DOMString
public function set align(value:DOMString):void
bgColor | property |
bgColor:DOMString
Cell background color. This attribute is deprecated in HTML 4.01.
public function get bgColor():DOMString
public function set bgColor(value:DOMString):void
border | property |
border:DOMString
The width of the border around the table.
public function get border():DOMString
public function set border(value:DOMString):void
caption | property |
caption:HTMLTableCaptionElement
Modified in DOM Level 2 Returns the table's CAPTION, or void if none exists.
public function get caption():HTMLTableCaptionElement
public function set caption(value:HTMLTableCaptionElement):void
DOMException — HIERARCHY_REQUEST_ERR: if the element is not a CAPTION.
|
cellPadding | property |
cellPadding:DOMString
Specifies the horizontal and vertical space between cell content and cell borders.
public function get cellPadding():DOMString
public function set cellPadding(value:DOMString):void
cellSpacing | property |
cellSpacing:DOMString
Specifies the horizontal and vertical separation between cells.
public function get cellSpacing():DOMString
public function set cellSpacing(value:DOMString):void
frame | property |
frame:DOMString
Specifies which external table borders to render.
public function get frame():DOMString
public function set frame(value:DOMString):void
rows | property |
rows:HTMLCollection
[read-only] Returns a collection of all the rows in the table, including all in THEAD, TFOOT, all TBODY elements.
public function get rows():HTMLCollection
rules | property |
rules:DOMString
Specifies which internal table borders to render.
Valid values are:
public function get rules():DOMString
public function set rules(value:DOMString):void
summary | property |
summary:DOMString
Description about the purpose or structure of a table.
public function get summary():DOMString
public function set summary(value:DOMString):void
tBodies | property |
tBodies:HTMLCollection
Returns a collection of the table bodies (including implicit ones).
public function get tBodies():HTMLCollection
public function set tBodies(value:HTMLCollection):void
tFoot | property |
tFoot:HTMLTableSectionElement
Modified in DOM Level 2 Returns the table's TFOOT, or null if none exists.
public function get tFoot():HTMLTableSectionElement
public function set tFoot(value:HTMLTableSectionElement):void
DOMException — HIERARCHY_REQUEST_ERR: if the element is not a TFOOT.
|
tHead | property |
tHead:HTMLTableSectionElement
Modified in DOM Level 2 Returns the table's THEAD, or null if none exists.
public function get tHead():HTMLTableSectionElement
public function set tHead(value:HTMLTableSectionElement):void
DOMException — HIERARCHY_REQUEST_ERR: if the element is not a THEAD.
|
width | property |
width:DOMString
Specifies the desired table width.
public function get width():DOMString
public function set width(value:DOMString):void
createCaption | () | method |
public function createCaption():HTMLElement
Create a new table caption object or return an existing one.
ReturnsHTMLElement — A CAPTION element.
|
createTFoot | () | method |
public function createTFoot():HTMLElement
Create a table footer row or return an existing one.
ReturnsHTMLElement — A footer element (TFOOT).
|
createTHead | () | method |
public function createTHead():HTMLElement
Create a table header row or return an existing one.
ReturnsHTMLElement — A new table header element (THEAD).
|
deleteCaption | () | method |
public function deleteCaption():void
Delete the table caption, if one exists.
deleteRow | () | method |
public function deleteRow(index:Number):void
Delete a table row.
Parameters
index:Number — The index of the row to be deleted. This index starts from
0 and is relative to the logical order (not document order) of all the
rows contained inside the table. If the index is -1 the last row in the
table is deleted.
|
DOMException — INDEX_SIZE_ERR: Raised if the specified index is greater
than or equal to the number of rows or if the index is a negative number other than -1.
|
deleteTFoot | () | method |
public function deleteTFoot():void
Delete the footer from the table, if one exists.
deleteTHead | () | method |
public function deleteTHead():void
Delete the header from the table, if one exists.
insertRow | () | method |
public function insertRow(index:Number):HTMLElement
Insert a new empty row in the table. The new row is inserted immediately before and in the same section as the current indexth row in the table. If index is -1 or equal to the number of rows, the new row is appended. In addition, when the table is empty the row is inserted into a TBODY which is created and inserted into the table.
Note: A table row cannot be empty according to [HTML 4.01].
Parameters
index:Number — The row number where to insert a new row. This index starts from 0 and
is relative to the logical order (not document order) of all the rows contained inside the table.
|
HTMLElement — The newly created row.
|
DOMException — INDEX_SIZE_ERR: Raised if the specified index is
greater than the number of rows or if the index is a negative number other than -1.
|