JSFiddle - React, Tailwind, and code Playground
HTML
<table class="table table-hover table-primary nomargin">
<th class="text-center"> Hostname </th>
<th class="text-center"> Prenom </th>
<th class="text-center"> Nom </th>
<th class="text-center"> Login </th>
<th class="text-center"> Service </th>
<th class="text-center"> Localisation </th>
<th class="text-center"> Costcenter </th>
<th class="text-center"> Statut </th>
<th class="text-center"> Type </th>
<th class="text-center"> Marque </th>
<th class="text-center"> N° Serie </th>
<th class="text-center"> N° SBE </th>
<th class="text-center"> Type de disque </th>
<th class="text-center"> Action </th>
<tr id="ligne_tableau">
<td ondblclick="addInput(this)" id="hostname17">a</td>
<td ondblclick="addInput(this)" id="prenom17">b</td>
<td ondblclick="addInput(this)" id="nom17">c</td>
<td ondblclick="addInput(this)" id="login17">d</td>
<td ondblclick="addInput(this)" id="service17">e</td>
<td ondblclick="addInput(this)" id="localisation17">f</td>
<td ondblclick="addInput(this)" id="costcenter17">g</td>
<td ondblclick="addInput(this)" id="statut17"></td>
<td ondblclick="addInput(this)" id="type17">ih</td>
<td ondblclick="addInput(this)" id="marque17">j</td>
<td ondblclick="addInput(this)" id="num_serie17">k</td>
<td ondblclick="addInput(this)" id="num_sbe17"></td>
<td ondblclick="addInput(this)" id="type_disque17">m</td>
<td>
<a href="#" onclick="mod_tab(17)" class="btn btn-info"><span class="glyphicon glyphicon-pencil" title="Validation de la modification"></span></a>
<a href="#" id="17" class="btn btn-danger ol-md-offset-1 remove-row-table"><span class="glyphicon glyphicon-remove" title="Suppression de la ligne"></span></a>
</td>
</tr>
<tr id="ligne_tableau">
<td ondblclick="addInput(this)" id="hostname18">a</td>
<td ondblclick="addInput(this)" id="prenom18">b</td>
<td ondblclick="addInput(this)" id="nom18">c</td>
<td ondblclick="addInput(this)"...
CSS
.hidden {
display: none;
}
JavaScript
$(function() {
$("#search").on("keyup", function() {
var regval = new RegExp('^' + $(this).val(), "i");
$("table tr:gt(0)").addClass('hidden');
$("table tr:gt(0)").filter(function() {
var found = 0;
$(this).find('td').each(function() {
$(this).html().match(regval) && found++
});
return found > 0; }).removeClass('hidden');
});
$('#reset').on('click', function() {
$("#search").val('').trigger('keyup');
})
});