javascript html remove code example Example: remove javascript var elem = document.getElementById("myDiv"); elem.parentNode.removeChild(elem);