|
@@ -32,12 +32,22 @@
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ let clearFilter = function() {
|
|
|
+ let table = document.getElementsByTagName("tbody")[0];
|
|
|
+ let tr = table.getElementsByTagName("tr");
|
|
|
+
|
|
|
+ for (let i = 0; i < tr.length; i++) {
|
|
|
+ tr[i].style.display = "";
|
|
|
+ }
|
|
|
+ };
|
|
|
</script>
|
|
|
</head>
|
|
|
<body>
|
|
|
<a href="/">Search again</a>
|
|
|
<div>Filter:
|
|
|
<input type="text" name="name" onchange="filterTable(this.value)" autocomplete="off">
|
|
|
+ <button class="btn" onclick="clearFilter()">Clear</button>
|
|
|
</div>
|
|
|
<table>
|
|
|
<thead>
|