nsIDOMNode 编辑

dom/interfaces/core/nsIDOMNode.idlScriptable 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.6

Method 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

AttributeTypeDescription
attributesnsIDOMNamedNodeMapRead only.
childNodesnsIDOMNodeListRead only.
firstChildnsIDOMNodeRead only.
lastChildnsIDOMNodeRead only.
localNameDOMStringRead only.
namespaceURIDOMStringRead only.
nextSiblingnsIDOMNodeRead only.
nodeNameDOMStringRead only.
nodeTypeunsigned shortRead only.
nodeValueDOMString 
ownerDocumentnsIDOMDocumentRead only.
parentNodensIDOMNodeRead only.
prefixDOMString 
previousSiblingnsIDOMNodeRead only.

Constants

ConstantValueDescription
ELEMENT_NODE1 
ATTRIBUTE_NODE2 
TEXT_NODE3 
CDATA_SECTION_NODE4 
ENTITY_REFERENCE_NODE5 
ENTITY_NODE6 
PROCESSING_INSTRUCTION_NODE7 
COMMENT_NODE8 
DOCUMENT_NODE9 
DOCUMENT_TYPE_NODE10 
DOCUMENT_FRAGMENT_NODE11 
NOTATION_NODE12 

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:100 次

字数:9316

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文