mostly working templating for landing page
This commit is contained in:
19
static/scripts.js
Normal file
19
static/scripts.js
Normal file
@@ -0,0 +1,19 @@
|
||||
function tableSearch(){
|
||||
var table, input, tr, td, row_content;
|
||||
table = document.getElementById("tableRooms");
|
||||
input = document.getElementById("tableRoomSearch").value.toUpperCase();
|
||||
tr = table.getElementsByTagName("tr");
|
||||
|
||||
for (let i = 0; i < tr.length; i++) {
|
||||
td = tr[i].getElementsByTagName("td")[0];
|
||||
if(td){
|
||||
row_content = td.textContent || td.innerText;
|
||||
if (row_content.toUpperCase().indexOf(input) > -1) {
|
||||
tr[i].style.display = "";
|
||||
}
|
||||
else{
|
||||
tr[i].style.display ="none";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user