Anrew,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.div {
background: yellow;
width: 100px;
height: 100px;
float: left;
margin-right: 10px;}
</style>
<script>
window.addEventListener('DOMContentLoaded', function() {
var delites = document.querySelectorAll('.delite'),
alldelite = document.querySelector('.alldelite');
[].forEach.call(delites, function(item) {
item.addEventListener('click', function() {
var body = document.querySelector('body');
body.removeChild(this.parentNode)
});
});
alldelite.addEventListener('click', function () {
[].forEach.call( document.querySelectorAll('.delite'), function(button) {
button.click()
});
});
});
</script>
</head>
<body>
<div class="div">
<button type="button" class="delite" >удалить</button>
1</div>
<div class="div">
<button type="button" class="delite" >удалить</button>
2</div>
<div class="div">
<button type="button" class="delite" >удалить</button>
3</div>
<button type="button" class="alldelite">удалить все</button>
</body>
</html>