How do you filter table via JavaScript with a bootstrap dropdown?

I think my question is a little bit more complicated than what I saw on the internet because I need to make multiple filtrations on a single table. So here's my code:


function searchTable() {
  var input, filter, table, tr, td, i;
  input = document.getElementById("search");
  filter = input.value.toUpperCase();
  table = document.getElementById("table");
  tr = table.getElementsByTagName("tr");
  for (i = 0; i < tr.length; i++) {
    td = tr[i].getElementsByTagName("td")[0];
    if (td) {
      if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
        tr[i].style.display = "";
      } else {
        tr[i].style.display = "none";
#table {
  border-collapse: collapse;
  width: 100%;
  border: 1px solid #ddd;
  margin-top: 20px;

#table th,
#table td {
  text-align: left;
  padding: 12px;

#table tr {
  border-bottom: 1px solid #ddd;

#table tr.header,
#table tr:hover {
  background-color: #f1f1f1;
<script src=""></script>
<script src=""></script>
<link href="" rel="stylesheet"/>
<link href="" rel="stylesheet"/>
<div class="input-group">
  <input Add Comment -->
JavaScript         filter         html-table         bootstrap-4        
Your Answer: 

0 Answers
Edit Account
Change Settings
Email Notifications Notifications will be sent to
Select option for your email notifications:
Mature / News Filter We'll send on email when new jobs are posted
Option 2 for email notification We'll send on email when new jobs are posted