HTML and CSS Reference
In-Depth Information
JavaScript Element
Description
Methods
javaEnabled()
Indicates whether the browser supports Java
plugins.refresh()
Checks for newly installed plug-ins
registerContentHandler
(
mimetype
,
url
,
title
)
Requests the registration of the specified
url
as a handler for displaying data of
type
mimetype
along with the text
title
taintEnabled()
Specifies whether data tainting is enabled
Node
A node within the document tree
Properties
baseURI
The base URL of the node against which relative URLs are resolved
childNodes
An array of child nodes of the current node
firstChild
The first child of the current node
lastChild
The last child of the current node
nextSibling
The sibling node that immediately follows the current node
nodeName
The name of the node; for element nodes this returns the tag name
nodeType
The type of node
nodeValue
The value of the node
ownerDocument
The document that contains the node
parentNode
The parent or container node
previousSibling
The sibling node that immediately precedes the current node
textContent
The text content of the node
Methods
appendChild(
node
)
Adds
node
as a new last child of the current node
cloneNode(
deep
)
Returns a copy of the current node including all descendant nodes if
deep
is true
compareDocumentPosition
(
node
)
Compares the document position of the current node to
node
and returns a number
describing the relationship between the nodes
hasChildNodes()
Returns true if the current node has child nodes
insertBefore(
new
,
reference
)
Inserts the node
new
directly before the child node
reference
isDefaultNamespace
(
namespace
)
Returns true if the URL of
namespace
matches the default namespace
isEqualNode(
node
)
Returns true if
node
is identical in content, type, and structure to the current node
isSameNode(
node
)
Returns true if
node
is the same as the current node
lookupNamespaceURI
(
prefix
)
Returns the namespace URL associated with the namespace prefix
prefix
lookupPrefix(
namespace
)
Returns the namespace prefix associated with the
namespace
namespace URL
normalize()
Normalizes the text node descendants of the current node, merging adjacent nodes
and removing empty nodes
removeChild(
node
)
Removes
node
from the
childNodes
array of the current node
replaceChild(
new
,
old
)
Replaces the
old
child node with the new child node
NodeList
An array of nodes
Properties
length
The number of nodes in the node list
Methods
item(
index
)
Returns the node at the specified
index