removeNode method

This topic has not yet been rated - Rate this topic

Removes the object from the document hierarchy.

Syntax

object.removeNode(fDeep)

Parameters

fDeep [in, optional]

Type: Boolean

A Boolean that specifies one of the following values.

false (false)

Default. childNodes collection of the object is not removed.

true (true)

childNodes collection of the object is removed.

Return value

Type: IHTMLDOMNode

Returns a reference to the object that is removed.

Standards information

There are no standards that apply here.

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.

Examples

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

See also

a
abbr
address
area
attribute
article
aside
b
base
bdo
blockQuote
body
br
button
caption
cite
code
col
colGroup
comment
dd
del
div
dl
documentType
dt
em
embed
fieldSet
figcaption
figure
footer
form
head
header
hgroup
hn
hr
html
i
iframe
img
input type=button
input type=checkbox
input type=file
input type=hidden
input type=image
input type=password
input type=radio
input type=reset
input type=submit
input type=text
ins
kbd
label
legend
li
link
map
mark
nav
object
ol
option
p
pre
ProcessingInstruction
q
s
samp
script
section
select
small
span
strong
sub
sup
table
tBody
td
textArea
tFoot
th
tHead
title
tr
u
ul
var
Reference
appendChild
cloneNode
insertBefore
Conceptual
About the W3C Document Object Model

 

 

Build date: 11/28/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.