How to check if any cell is empty in a html table
by Akram kamal
HTML
<table>
<tr>
<td>
<input>
</td>
<td>
<input>
</td>
<td>
<input>
</td>
</tr>
<tr>
<td>
<input>
</td>
<td>
<input>
</td>
<td>
<input>
</td>
</tr>
<tr>
<td>
<input>
</td>
<td>
<input>
</td>
<td>
<input>
</td>
</tr>
<tr>
<td>
<input>
</td>
<td>
<input>
</td>
<td>
<input>
</td>
</tr>
</table>
<button>check</button>
JavaScript
$(function () {
$("button").click(function () {
var empty = $("td input").filter(function () {
return this.value === ""
})
console.log(empty)
})
})