<script language="JavaScript">
function total(){
var vq1 = document.getElementById('q1');
var vq2 = document.getElementById('q2');
var vq3 = document.getElementById('q3');
var vq4 = document.getElementById('q4');
var vq5 = document.getElementById('q5');
var vq6 = document.getElementById('q6');
var vq8 = document.getElementById('q8');
var vq9 = document.getElementById('q9');
var vq10 = document.getElementById('q10');
var prixht = document.getElementById('prixht');
var vp1 = 270;
var vp2 = 147;
var vp3 = 27;
var vp4 = 157;
var vp5 = 167;
var vp6 = 297;
var vp7 = 97;
var vs1 = vq1.value * vp1;
var vs2 = vq2.value * vp2;
if (vq8.checked){
var vs3 = 0;
}
else {
var vs3 = vp3;
}
if (vq9.checked){
vs4 =0;
}
else {
var vs4 = vp4;
}
if (vq10.checked){
var vs5 = 0;
}
else {
var vs5 = vp5;
}
if (vq6.value == 1){
var vs6 = vp6;
}
else {
var vs6 = vq6.value * vp7;
vs6=vs6 + 200;
}
if (vq6.value == 0){
prixht.value = vs1 + vs2 + vs3 + vs4 + vs5;
}
else {
prixht.value = vs1 + vs2 + vs3 + vs4 + vs5 + vs6;
}
}
</script>
<tr>
<td style="width: 196px;">Nombres de pages :</td>
<td><input id='q6' name="nbpages" size="3" type="text" value="0" onkeyup="total()" /></td>
</tr>
<tr>
<td style="width: 196px;"><span class="prix">(270€*)</span>Photos supplémentaires</td>
<td><div><input id="q1" name="photosupp" size="3" type="text" value="0" onkeyup="total()" /></div></td>
</tr>
<tr>
<td style="width: 196px;"><span class="prix">(147€*)</span>Vidéo supplémentaire</td>
<td><div><input id="q2" name="videosupp" size="3" type="text" value="0" onkeyup="total()" /></div></td>
</tr>
<tr>
<td style="width: 196px;"> </td>
<td> </td>
</tr>
<tr>
<td style="width: 196px;"><span class="prix">(27€*)</span>Récupération logo</td>
<td><label><input id='q3' name="recup" value="oui" type="radio" onclick="total()" />oui</label><label><input id='q8' name="recup" value="non" type="radio" onclick="total()" />non</label></td>
</tr>
<tr>
<td style="width: 196px;"><span class="prix">(157€*)</span>Création logo</td>
<td><label><input id='q4' name="crea" value="oui" type="radio" onclick="total()" />oui</label><label><input id='q9' name="crea" value="non" type="radio" onclick="total()" />non</label></td>
</tr>
<tr>
<td style="width: 196px;"><span class="prix">(167€*)</span>Newsletter</td>
<td><label><input id='q5' name="newz" value="oui" type="radio" onclick="total()" />oui</label><label><input id='q10' name="newz" value="non" type="radio" onclick="total()" />non</label></td>
</tr>
<tr>
<td style="width: 196px;">Total Hors Taxe : <div id="s1"><input name="prixht" id="prixht" type="text" readonly="readonly" /></div> </td>
<td> </td>
</tr>
voila maintenant cela prend en compte les boutons radio non, le dernier problème au code est que si je rentre une valeur dans un input ou en checked un seul radio il me met le prix des 3 boutons radio additionné et fait les modifications lorsque que je coche le bouton non ce qui m'embête étant donné que je ne veux pas que l'utilisateur sois obliger de répondre au boutons radio..