<HTML> <HEAD> </HEAD> <script> function cal() { var pl=document.form1.places.value; var tf=document.form1.tarifs.value; var resultat=pl*tf; document.form1.tresultat.value=resultat; } </script> <form name="form1"> Places : <select name="places"> <option value="1" onClick="cal()">1 <option value="2" onClick="cal()">2 <option value="3" onClick="cal()">3 <option value="4" onClick="cal()">4 </select> Tarifs : <select name="tarifs"> <option value="2" onClick="cal()">Jeune <option value="4" onClick="cal()">Adulte </select> </form> </HTML>
<script type ="text/javascript"> function calc() { var tplaces = document.getElementById("places"); var tprix = document.getElementById("tarifs"); var ttresultat = document.getElementById("tresultat"); ttresultat.value = tplaces.value * tprix.value; } </script>
<HTML> <HEAD> </HEAD> <script type="text/javascript"> function calc() { var tplaces = document.getElementById("places"); var tprix = document.getElementById("tarifs"); var ttresultat = document.getElementById("tresultat"); ttresultat.value = tplaces.value * tprix.value; } </script> <form id="form1"> Places : <select id="places"> <option value="1" onClick="cal()">1 <option value="2" onClick="cal()">2 <option value="3" onClick="cal()">3 <option value="4" onClick="cal()">4 </select> Tarifs : <select id="tarifs"> <option value="2" onClick="cal()">Jeune <option value="4" onClick="cal()">Adulte </select> </form> </HTML>
function calc()
onClick="cal()"
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question