function searchTable(table, searchText) {
    let rows = document.getElementById(table).children[1].rows;
    for (let i = 0; i < rows.length; i++) {
        let cells = rows[i].cells;
        for (let j = 0; j < cells.length; j++) {
            if (cells[j].innerHTML.toLowerCase().indexOf(searchText.toLowerCase()) > -1) {
                rows[i].style.display = '';
                break;
            } else {
                rows[i].style.display = 'none';
            }
        }
    }
}
// A function to search linearly in a table
A function to search linearly in a table
A function to search linearly in a table
function searchTable(table, searchText) {
    let rows = document.getElementById(table).children[1].rows;
    for (let i = 0; i < rows.length; i++) {
        let cells = rows[i].cells;
        for (let j = 0; j < cells.length; j++) {
            if (cells[j].innerHTML.toLowerCase().indexOf(searchText.toLowerCase()) > -1) {
                rows[i].style.display = '';
                break;
            } else {
                rows[i].style.display = 'none';
            }
        }
    }
}
function searchTable ( table , searchText ) { let rows = document . getElementById ( table ) . children [ 1 ] . rows ; for ( let i = 0 ; i < rows . length ; i ++ ) { let cells = rows [ i ] . cells ; for ( let j = 0 ; j < cells . length ; j ++ ) { if ( cells [ j ] . innerHTML . toLowerCase ( ) . indexOf ( searchText . toLowerCase ( ) ) > - 1 ) { rows [ i ] . style . display = '' ; break ; } else { rows [ i ] . style . display = 'none' ; } } } }
A function to search linearly in a table
A function to search linearly in a table