| 12
 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
 
 |  
<script type="text/javascript">
 
function totalite()
{
var p0 = document.getElementById('points0').value;
var p1 = document.getElementById('points1').value;
var p2 = document.getElementById('points2').value;
var p3 = document.getElementById('points3').value;
var p4 = document.getElementById('points4').value;
var p5 = document.getElementById('points5').value;
var p6 = document.getElementById('points6').value;
var p7 = document.getElementById('points7').value;
var p8 = document.getElementById('points8').value;
var p9 = document.getElementById('points9').value;
document.getElementById('total').value=parseInt(p0,10)+parseInt(p1,10)+parseInt(p2,10)+parseInt(p3,10)+parseInt(p4,10)+parseInt(p5,10)+parseInt(p6,10)+parseInt(p7,10)+parseInt(p8,10)+parseInt(p9,10);
//même souci avec : document.getElementById('total').value=parseInt(p0)+parseInt(p1)+parseInt(p2)+parseInt(p3)+parseInt(p4)+parseInt(p5)+parseInt(p6)+parseInt(p7)+parseInt(p8)+parseInt(p9);
 
} 
 
</script>
 
<select name="points[0]" id="points0" onChange="totalite();">
                            <option  >0</option>
                            <option  >1</option>
                            <option  >2</option>
                            <option  >3</option>
                            <option  >4</option>
                            <option  >5</option>
                          </select>
 
//idem pour les 9 autres selects : id="points1",  id="points2", etc... 
 
<input name="total" type="text" id="total" size="3" readonly="readonly"> | 
Partager