what is the difference between removenode / removechild

S

shotokan99

hi,

just wandering what is the difference between the two? aside from
name, syntax, etc. what are the specific use of each?

tnx
 
R

RobG

hi,

just wandering what is the difference between the two? aside from
name, syntax, etc. what are the specific use of each?

removeChild is the W3C DOM Core method of removing nodes from a
document:

<URL: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1734834066 >

removeNode is roughly the IE proprietary method to do the same:

<URL: http://msdn2.microsoft.com/en-us/library/ms536708.aspx >

removeChild is very likely implemented in many more browsers than
removeNode, so use removeChild.
 
D

David Golightly

removeChild is the W3C DOM Core method of removing nodes from a
document:

<URL:http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1734834066>

removeNode is roughly the IE proprietary method to do the same:

<URL:http://msdn2.microsoft.com/en-us/library/ms536708.aspx>

removeChild is very likely implemented in many more browsers than
removeNode, so use removeChild.

RobG is right. removeChild has been supported on IE since at least
IE5 (except for removing attribute nodes, but that's an esoteric use
of this method anyway), so there's no reason to use removeNode in
practice. See: http://www.mozilla.org/docs/dom/grids/core_tab.html#legend

-David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top