background-position: 10px 12px;
background-repeat: no-repeat;
border-collapse: collapse;
#myTable th, #myTable td {
border-bottom: 1px solid #ddd;
#myTable tr.header, #myTable tr:hover {
background-color: #f1f1f1;
<h2>Freetuts.net hướng dẫn tạo Filter Table</h2>
<input type="text" id="myInput" placeholder="Search for Club.." title="Type in a name of Club">
<th style="width:60%;">Club</th>
<th style="width:40%;">Country</th>
<td>Borussia Dortmund</td>
<td>Paris Saint-Germain</td>
<td>Manchester United</td>
var input = document.getElementById("myInput");
var filter, table, tr, td, i;
filter = input.value.toUpperCase();
table = document.getElementById("myTable");
tr = table.getElementsByTagName("tr");
table.style.display = "none";
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[0];
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
table.style.display = "table";
tr[i].style.display = "";
tr[i].style.display = "none";
input.addEventListener("keyup", myFunction);