repz,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script>
document.addEventListener( "DOMContentLoaded" , () => {
let block_array = document.querySelectorAll(".delete");
for (let i = 0; i < block_array.length; i++) {
let child = block_array[i].querySelector("[content='myTarget']");
let value = +child.textContent;
console.log(value);
if (value > 0) {
block_array[i].parentNode.removeChild(block_array[i]);
}
}
});
</script>
</head>
<body>
<div class="delete">
<table>
<tbody>
<tr>
<td>
</td>
<td>
</td>
<td>
<table>
<tbody>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td >
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<div>Target blank</div>
</td>
<td>
<div>
<span content="myTarget">0</span>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</div>
<div class="delete">
<table>
<tbody>
<tr>
<td>
</td>
<td>
</td>
<td>
<table>
<tbody>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td >
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<div>Target blank</div>
</td>
<td>
<div>
<span content="myTarget">10</span>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>