HBCMS更多的中文手册参考:

removeNode Method

DHTML文档教程

Removes the object from the document hierarchy.

dhtml语法

oRemoved = object.removeNode( [bRemoveChildren])

Parameters

bRemoveChildren Optional. Booleanthat specifies one of the following values:
falseDefault. childnodes collection of the object is not removed.
truechildnodes collection of the object is removed.

return value

returns a reference to the object that is removed.

remarks

this property is accessible at run time. if elements are removed at run time, before the closing tag is parsed, areas of the document might not render.

DHTML代码范例

This example uses the removeNode method to remove a table from the document hierarchy.

<SCRIPT>
function fnRemove(){
// 'true' possible value specifies removal of childNodes also
oTable.removeNode(true);
}
</SCRIPT>
<TABLE ID = oTable>
<TR>
<TD>Cell 1</TD>
<TD>Cell 2</TD>
</TR>
</TABLE>
<INPUT TYPE = button VALUE = "Remove Table" onclick = "fnRemove()">

是否符合公共标准

There is no public standard that applies to this method.

Applies To

A, ACRONYM, ADDRESS, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, DD, DEL, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FONT, FORM, FRAMESET, HEAD, hn, HTML, I, IFRAME, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, nextID, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, STYLE, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

更多语法参考

appendchild, clonenode, insertbefore, About the W3C Document Object Model