Bonjour,
plutôt qu'une adresse, il aurait été plus
simple de mettre le html ici, non ?
un ch'tit début de réponse ( on peut
automatiser la génération des select, par ex... )
<html>
<head>
<title>calcul d'heures</title>
<script type="text/javascript">
function calcul()
{
var r=0;
for ( var n=0;n<frm.seld.length;n++ )
{
if ( frm.seld[n].selectedIndex<0 || frm.self[n].selectedIndex<0 ||
frm.seld[n].selectedIndex>frm.self[n].selectedIndex )
{
alert("erreur liste "+n);
return;
}
r+=frm.self[n].value-frm.seld[n].value;
}
frm.result.value=Math.floor(r/60)+"h"+(r%60);
}
</script>
</head>
<body>
<form name="frm">
<table>
<tr>
<td> </td>
<td>Lundi</td>
<td>Mardi</td>
</tr>
<tr>
<td>de</td>
<td><select name="seld" size="1">
<option value=480>8h00</option>
<option value=510>8h30</option>
<option value=540>9h00</option>
<option value=570>9h30</option>
</select></td>
<td><select name="seld" size="1">
<option value=480>8h00</option>
<option value=510>8h30</option>
<option value=540>9h00</option>
<option value=570>9h30</option>
</select></td>
</tr>
<tr>
<td>à</td>
<td><select name="self" size="1">
<option value=510>8h30</option>
<option value=540>9h00</option>
<option value=570>9h30</option>
<option value=600>10h00</option>
</select></td>
<td><select name="self" size="1">
<option value=510>8h30</option>
<option value=540>9h00</option>
<option value=570>9h30</option>
<option value=600>10h00</option>
</select></td>
</tr>
</table>
<input type="button"
value="Calcul"
onclick="calcul();" /> soit un total de : <input type="text" name="result"/>
</form>
</body>
</html>
Cordialement. Bul. ~ Site ~