12 Jul 2011

Removing elements in javascript

document.body.removeChild(document.body.childNodes[0]); //Removes first element of the page

 JQuery :
$("div:first").remove(); //Removes first div element of the page

No comments:

Post a Comment