nsIDOMNode 编辑
dom/interfaces/core/nsIDOMNode.idl
Scriptable This interface is the primary datatype for the entire Document Object Model. It represents a single node in the document tree. Inherits from: nsISupports
Last changed in Gecko 0.9.6Method overview
nsIDOMNode appendChild(in nsIDOMNode newChild) |
nsIDOMNode cloneNode(in boolean deep); |
boolean hasAttributes(); |
boolean hasChildNodes(); |
nsIDOMNode insertBefore(in nsIDOMNode newChild, in nsIDOMNode refChild) |
boolean isSupported(in DOMString feature, in DOMString version); |
void normalize(); |
nsIDOMNode removeChild(in nsIDOMNode oldChild) |
nsIDOMNode replaceChild(in nsIDOMNode newChild, in nsIDOMNode oldChild) |
Attributes
Attribute | Type | Description |
attributes |
| Read only. |
childNodes |
| Read only. |
firstChild |
| Read only. |
lastChild |
| Read only. |
localName | DOMString | Read only. |
namespaceURI | DOMString | Read only. |
nextSibling |
| Read only. |
nodeName | DOMString | Read only. |
nodeType | unsigned short | Read only. |
nodeValue | DOMString | |
ownerDocument |
| Read only. |
parentNode |
| Read only. |
prefix | DOMString | |
previousSibling |
| Read only. |
Constants
Constant | Value | Description |
ELEMENT_NODE | 1 | |
ATTRIBUTE_NODE | 2 | |
TEXT_NODE | 3 | |
CDATA_SECTION_NODE | 4 | |
ENTITY_REFERENCE_NODE | 5 | |
ENTITY_NODE | 6 | |
PROCESSING_INSTRUCTION_NODE | 7 | |
COMMENT_NODE | 8 | |
DOCUMENT_NODE | 9 | |
DOCUMENT_TYPE_NODE | 10 | |
DOCUMENT_FRAGMENT_NODE | 11 | |
NOTATION_NODE | 12 |
Methods
appendChild()
nsIDOMNode appendChild( in nsIDOMNode newChild );
Parameters
newChild
Return value
cloneNode()
nsIDOMNode cloneNode( in boolean deep );
Parameters
deep
Return value
hasAttributes()
boolean hasAttributes();
Parameters
None.
Return value
hasChildNodes()
boolean hasChildNodes();
Parameters
None.
Return value
insertBefore()
nsIDOMNode insertBefore( in nsIDOMNode newChild, in nsIDOMNode refChild );
Parameters
newChild
refChild
Return value
isSupported()
boolean isSupported( in DOMString feature, in DOMString version );
Parameters
feature
version
Return value
normalize()
void normalize();
Parameters
None.
removeChild()
nsIDOMNode removeChild( in nsIDOMNode oldChild );
Parameters
oldChild
Return value
replaceChild()
nsIDOMNode replaceChild( in nsIDOMNode newChild, in nsIDOMNode oldChild );
Parameters
newChild
oldChild
Return value
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论