remove item javascript html code example
Example 1: remove div javascript
var div = document.getElementById('div-01');
div.remove();
Example 2: delete html with javascript
document.querySelector('selector').remove();
var div = document.getElementById('div-01');
div.remove();
document.querySelector('selector').remove();