Hi All I need help i'm new on Js.
I generate 4 table and 4 input field under the loop of "JSP".
My Question is how to pass the Table value with input field value both in Function
Input field value and Table value pass in "myFunction(inputvalue, table)" for filter
I add the value of input in "myFunction(this.value)" but i'm stuck. how to add the table values in that function
<div class="w3-container">
<input class="w3-input w3-border w3-padding" type="text" placeholder="Search for names.." id="myInput" onkeyup="myFunction(this.value)">
<table class="w3-table-all" id="myTable">
<tr>
<th style="width:60%;">Name</th>
<th style="width:40%;">Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Germany</td>
</tr>
<tr>
<td>Berglunds snabbkop</td>
<td>Sweden</td>
</tr>
</table>
</div>
<script>
function myFunction(searchValue, TableId) {
}
</script>