remove an element in javascript

by Sanju 2010-02-01 18:58:54

Remove an element in javascript

To remove an element, use the removeChild() method of its parent element,

var rm = document.getElementById('test');
rm.parentNode.removeChild(rm);


It works fine... Smile

Tagged in:

926
like
0
dislike
0
mail
flag

You must LOGIN to add comments