<html> <head> <title>Umrechnungen</title> <script> function changed(e) { var input = document.getElementById('input').value; var inOpt = document.getElementById('inOpt').value; var outOpt = document.getElementById('outOpt').value; var output = document.getElementById('output'); output.value = (input * inOpt / outOpt).toFixed(10); } </script> </head> <body> <h1>Umrechnungen</h1> <table> <tr> <td><input type="decimal" id="input" onkeyup="changed();" value="0"></input></td> <td><select id="inOpt" onchange="changed();"> <option value="1">m - Meter</option> <option value="1000">km - Kilometer</option> <option value="1609.3440">Meile(n)</option> <option value="1852.216">Seemeile(n)</option> <option value="0.0254">Zoll / Inch</option> <option value="0.9144">yard</option> <option value="9460730472580800">Lichtjahr(e)</option> <option value="17987547480">Lichtminute(n)</option> <option value="299792458">Lichtsekunde(n)</option> <option value="30856775800000000">parsec</option> <option value="149597870700">AE / AU</option> </select></td> <td>entsprechen</td> <td><input type="text" id="output" readonly="readonly" value="0"></input></td> <td><select id="outOpt" onchange="changed();"> <option value="1">m - Meter</option> <option value="1000">km - Kilometer</option> <option value="1609.3440">Meile(n)</option> <option value="1852.216">Seemeile(n)</option> <option value="0.0254">Zoll / Inch</option> <option value="0.9144">yard</option> <option value="9460730472580800">Lichtjahr(e)</option> <option value="17987547480">Lichtminute(n)</option> <option value="299792458">Lichtsekunde(n)</option> <option value="30856775800000000">parsec</option> <option value="149597870700">AE / AU</option> </select></td> </tr> </table> </body> </html>