Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
HTML and CSS
Methods
 removeNode Method

  Switch on low bandwidth view
removeNode Method

Removes the object from the document hierarchy.

Syntax

oRemoved = object.removeNode( [bRemoveChildren])

Parameters

bRemoveChildren Optional. A Boolean that specifies one of the following values.
false
Default. childNodes collection of the object is not removed.
true
childNodes 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()">

Standards Information

There is no public standard that applies to this method.

Applies To

A, ABBR, 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, OPTGROUP, 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, Element Constructor, HTMLDocument Constructor, Text Constructor

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker