Citation:
<script language="JavaScript">
<!--
function recalculer()
{
//déclarons trois variables temporaires
var val1=0;
var val2=0;
var val3=0;
var val4=0;
// et une variable pour le total
var total1=0;
val1=parseInt(document.getElementById('exemple1').value);
val2=parseInt(document.getElementById('exemple2').value);
val3=parseInt(document.getElementById('exemple3').value);
val4=parseInt(document.getElementById('exemple4').value);
//calcule total
total1=val1+val2+val3+val4;
document.getElementById('resultat1').value=total1;
}
</script>
D'avance merci