メモ
属性 nodeType メソッド のメモ
属性
childNodesプロパティ 子要素のリストをNodeListとして返します。
firstChildプロパティ 子要素のうち,最初の要素を返します。
lastChildプロパティ 子要素のうち,最後の要素を返します。
parentNodeプロパティ 親要素を返します。
.hasChildNodes() 子要素を持つかどうかを返します。
.childNodes.length 子要素の数を返します。
nodeType
const unsigned short ELEMENT_NODE = 1;
const unsigned short ATTRIBUTE_NODE = 2;
const unsigned short TEXT_NODE = 3;
previousSibling;このノードの直前にあるノード。
nextSibling;このノードの直後にあるノード。
attributes;このノード(それが Element である場合)の属性を含んでいる NamedNodeMap
ownerDocument;このノードに結びつけられた Document オブジェクト
メソッド
insertBefore(in Node newChild, in Node refChild)
raises(DOMException);
replaceChild(in Node newChild, in Node oldChild)
raises(DOMException);
removeChild(in Node oldChild) raises(DOMException);
appendChild(in Node newChild) raises(DOMException);
hasChildNodes();
cloneNode(in boolean deep);
ウェブページ(Feb.2011)
聖愛中学高等学校
http://www.seiai.ed.jp/
Dec.2009