amine99

Untitled

Mar 15th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.76 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <title>Exercice 1</title>
  4.         <script>
  5.             t = 0.338306;
  6.             function eutodt() {
  7.                 document.getElementById('d').value = f.eu.value/t;
  8.             }
  9.             function dttoeu() {
  10.                 document.getElementById('e').value = f.dt.value*t;
  11.             }
  12.             function taux() {
  13.                 t=prompt("Donner taux");
  14.                 return t;
  15.             }
  16.         </script>
  17.     </head>
  18.     <body>
  19.         <form name="f">
  20.             Conversion Devise<br><br>
  21.             Dinar : <input type="text" name="dt" id="d"><br><br>
  22.             Euro : <input type="text" name="eu" id="e"><br><br>
  23.             <input type="button" value="DT > EU" onclick="dttoeu()">
  24.             <input type="button" value="EU > DT" onclick="eutodt()"><br>
  25.             <input type="button" value="Modifier Taux" onclick="taux()">
  26.             <input type="reset" value="Reset">
  27.            
  28.         </form>
  29.     </body>
  30. </html>
Add Comment
Please, Sign In to add comment