Thilo: Waehrungsumrechnung

Beitrag lesen

Hallo!

Ich hab es mal neu geschrieben!

---schnipp---<html>
<head>
<title></title>
<script language="JavaScript">
<!--
function rechnen()
{
  var preis = document.forms["euroform"].elements[1].value;
  var kurs = document.forms["euroform"].elements[0].value;
  var euro = Math.round(preis / kurs);
  document.forms["euroform"].elements[2].value = euro;
}
//-->
</script>
</head>
<body>
<form name="euroform">
  <table border="0" width="100%">
    <tr>
      <td width="12%">Preis</td>
      <td width="12%"><select name="waerung" size="1">
        <option value="1.95583">DM</option>
        <option value="6.55957">FF</option>
        <option value="40.3399">LUF</option>
        <option value="40.3399">BEF</option>
        <option value="2.20371">NLG</option>
        <option value="166.386">ESP</option>
        <option value="0.787564">IEP</option>
        <option value="1936.27">ITL</option>
        <option value="13.7603">ATS</option>
        <option value="200.482">PTE</option>
        <option value="5.94573">FIM</option>
      </select></td>
      <td width="12%"><input type="text" size="8" maxlength="8"></td>
      <td width="12%"><input type="text" size="8" readonly> €</td>
      <td width="12%"><input type="button" value="Ausrechenen" onClick="rechnen()"></td>
      <td width="12%"><input type="reset" value="Löschen"></td>
    </tr>
  </table>
</form>
</body>
</html>
---schnapp---

Thilo