JavaScript/Removing Elements
From Wikibooks, open books for an open world
|
|
A reader has identified this page or section as an undeveloped draft or outline. You can help to develop the work, or you can ask for assistance in the project room. |
You can remove elements from the document in JavaScript as follows.
//get the element node element = document.getElementById("element"); //remove the element from the document document.removeChild(element);
This would remove the element with id 'element'.
This page may need to be