<html>
<body>
<h1>The remove() Method</h1>
<p>The remove() method removes the element from the DOM.</p>
<p id="demo">Click the button, and this paragraph will be removed from the DOM.</p>
<button onclick="myFunction()">Remove paragraph</button>
<script>
function myFunction() {
var myobj = document.getElementById("demo");
myobj.remove();
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_node_remove by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:02:20 GMT -->
</html>