<html> <head> <script language ="javascript"> function controle() { var a =eval(document.form.input.value); var b =eval(document.form.input1.value); document.form.input3.value=a+b } function production() { var a =eval(document.form.input.value); var b =eval(document.form.input1.value); document.form.input3.value=a*b } function soustraction() { var a =eval(document.form.input.value); var b =eval(document.form.input1.value); document.form.input3.value=a-b } -------------------------------------- function choixprop(form){ if(form.choix[0].checked) { controle()}; if(form.choix[1].checked) { production()}; if(form.choix[2].checked) { soustraction()};} </script> </head> <body bgcolor=#abcdef> <form name="form"> Enter le numero 1 <input type ="text" name="input" ><br> Enter le numero 2 <input type ="text" name="input1" ><br> Enter le numero 3 <input type ="text" name="input2" ><br> LA somme est <input type ="text" name="input3" ><br> <br> <br> <input type ="button" name="bouton" value="contrôler" onclick="soustraction(form)"> <br>---------------------------<br> <br> <br> <input type="radio" name= "choix" value="1" > choix 1<br> <input type="radio" name= "choix" value="2" > choix 2<br> <input type="radio" name= "choix" value="3" > choix 3<br> <input type="button" name= "bouton" value="verfiez votre choix" onClick="choixprop(form)"><br> </form> </body> </html>
- Monday
- December 23rd, 2024
- Ajouter un cours