Shekhar
Shekhar

Reputation: 11788

element.parentNode.removeChild() method not working in internet explorer

I am trying element.parentNode.removeChild() method. Its working fine in Firefox but not working in IE 9.

Can anyone please tell how to remove an element in IE using javascript?

Thanks...

Upvotes: 4

Views: 16696

Answers (1)

Use removeChild function in the parentNode of the element.

If element is the node that needs to be removed, then do this:

element.parentNode.removeChild(element)

Upvotes: 11

Related Questions