J ai compris il ne prend pas les valeurs or du 
	
	<td>input ... onchange....</td>
 J'ai tenter ca cela fonctionne
	
	1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
   |  
<html>
<head>
<title></title>
</head>
<body bgcolor="#FFFFE0" text="#000000">
<form name="formulaire" method="post" action="calcul1.php">
 <table width="610" border="0" align="center">
 <tr>
   <td><div align="right">Nombre d'adultes</div></td>
   <td><input type="text" name="pr_max" size="5" OnChange="document.formulaire.resultat1.value = (document.formulaire.pr_max.value * document.formulaire.qte_max.value) + document.formulaire.qte_t.value"><br><input name="qte_max" type="text" value="20"><br><input name="qte_t" type="text" value="100"></td>
   <td><div align="left">
         <input name="resultat1" type="text" id="resultat1" size="10">      
     €</div></td>
 </tr>
</table>
</form>
</html> | 
 Ma question maintenant :
Comment puis - je récupérer la valeur des champs situé en dehors de la formule mathématique ?
exemple pour h:
	
	1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
   | 
<html>
<head>
<title></title>
</head>
<body bgcolor="#FFFFE0" text="#000000">
<form name="formulaire" method="post" action="calcul1.php">
 <table width="610" border="0" align="center">
 <tr>
   <td><div align="right">Nombre d'adultes</div></td>
   <td><input type="text" name="pr_max" size="5" OnChange="document.formulaire.resultat1.value = (document.formulaire.pr_max.value * document.formulaire.qte_max.value) + document.formulaire.qte_t.value +document.formulaire.h.value"><br><input name="qte_max" type="text" value="20"><br><input name="qte_t" type="text" value="100"></td>
   <td><input type="text" name="h"></td>
   <td><div align="left">
         <input name="resultat1" type="text" id="resultat1" size="10">      
     €</div></td>
 </tr>
</table>
</form>
</html> | 
 
						
					
Partager