1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
<html>
<head>
</head>
<body>
<center><input type="text" id="myInput" onkeyup="myFunction()" placeholder="recherche ligne.."></center>
<link rel="stylesheet" href="style.css">
<form action="start.php" methode="GET"><table id="myTable"><tbody>
<tr><th width="100">Date</th><th width="100">Distance</th><th width="100">Ligne</th><th width="600">Libelle</th><th width="100">Voyage</th><th width="150"><input type="checkbox" id="select_all2">Effectué</th><th width="170">Raison</th><th>Commentaire</th><th width="50"> Supprimer<input type="checkbox" id="select_all">ALL</th></tr>
<tr>
<td align="center">04/01/2018</td>
<td align="center">23490</td>
<td align="center">2</td>
<td align="center">Algrange - Hayange - IUT Thionville-Yutz</td>
<td align="center">440</td>
<td align="center"> voyage effectué</td>
<td align="center">Erreur Conducteur</td>
<td>KAHLAOUI-BRETON</td>
<td align="center"><input type="checkbox" class="checkbox" name="1981600" value="1"></td>
</tr>
<tr>
<td align="center">04/01/2018</td>
<td align="center">23490</td>
<td align="center">2</td>
<td align="center">Algrange - Hayange - IUT Thionville-Yutz</td>
<td align="center">448</td>
<td align="center"><input type="checkbox" class="checkbox2" name="198420000000" value="1"></td>
<td align="center"><select name="19842"><option value="0" selected="selected"></option><option value="1">Panne bus</option><option value="2">Supprimé par PO</option><option value="3">Absence conducteur</option><option value="4">Greve</option><option value="5">Intemperie</option><option value="6">Problème technique</option><option value="7">Erreur Conducteur</option><option value="8">Problème sous traitant</option></select></td>
<td><input type="text" name="19842c" size="15"></td>
<td align="center"><input type="checkbox" class="checkbox" name="1984200" value="1"></td>
</tr>
</tbody></table><center>
<input name="submit_button" class="btnsub" type="submit" value="Valider">
</center>
</form>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
//checkBox de suppression
<script type="text/javascript">
$(document).ready(function(){
$('#select_all').on('click',function(){
if(this.checked){
$('.checkbox').each(function(){
this.checked = true;
});
}else{
$('.checkbox').each(function(){
this.checked = false;
});
}
});
$('.checkbox').on('click',function(){
if($('.checkbox:checked').length == $('.checkbox').length){
$('#select_all').prop('checked',true);
}else{
$('#select_all').prop('checked',false);
}
});
});
//Checkbox effectuée
</script>
<script type="text/javascript">
$(document).ready(function(){
$('#select_all2').on('click',function(){
if(this.checked){
$('.checkbox2').each(function(){
this.checked = true;
});
}else{
$('.checkbox2').each(function(){
this.checked = false;
});
}
});
$('.checkbox2').on('click',function(){
if($('.checkbox2:checked').length == $('.checkbox2').length){
$('#select_all2').prop('checked',true);
}else{
$('#select_all2').prop('checked',false);
}
});
});
</script>
//filtre
<script>
function myFunction() {
var input, filter, table, tr, td, i, txtValue;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
table = document.getElementById("myTable");
tr = table.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[2];
if (td) {
txtValue = td.textContent || td.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
</script>
</body></html> |
Partager