script: remove div using javascript

PHOTO EMBED

Mon Dec 11 2023 13:15:52 GMT+0000 (Coordinated Universal Time)

Saved by @mubashir_aziz

<script>
        let up = document.getElementById('GFG_UP');
        let down = document.getElementById('GFG_DOWN');
        let div = document.getElementById('GFG_DIV');
        up.innerHTML = "Click on button to remove the element.";
 
        function GFG_Fun() {
            div.parentNode.removeChild(div);
            down.innerHTML = "Element is removed.";
        }
    </script>
content_copyCOPY

https://www.geeksforgeeks.org/how-to-remove-an-html-element-using-javascript/