removeNode Method

MS Office DHTML, HTML & CSS

removeNode Method


Removes the object from the document hierarchy.

Syntax

oRemoved = object.removeNode(bRemoveChildren)

Parameters

bRemoveChildren Optional. Boolean that 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.

Example

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()">

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
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, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

See Also

appendChild, cloneNode, insertBefore


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.