Showing posts with label remove div input node javascript jquery. Show all posts
Showing posts with label remove div input node javascript jquery. Show all posts

Wednesday, October 22, 2008

Remove a HTML Element using Javascript

3 comments
Suppose the ID of the element is "objID"

The JavaScript method.(We are writing a custom function)



function removeElement(objID) {
var node = document.getElementById(objID);
node.parentNode.removeChild(node);
}



The JQuery method.



$("#objID").remove();



Its all about Keeping it Simple.
What do you say? :)
Read more...