<script language="JavaScript">
Celsius Fahrenheit Rechner function celtofar (form) { var temperatur = document.formx.f[0].checked ? 1 : 0 ||document.formx.f[1].checked ? 2 : 0; if (temperatur == 1){form.celsius.value = form.celsius.value + "°C = " + Math.round(form.celsius.value*1.8+32) + "°F" }; if (temperatur == 2) { form.celsius.value = form.celsius.value + "°F = " + Math.round((form.celsius.value-32)/1.8) + "°C" }; }
</script>
<form name=formx>
<TABLE BORDER cellpadding=3 cellspacing=0 align=center style="background-color:menu"> <TR><TD> <input type="radio" name="f" checked>°C <input type="radio" name="f">°F <input type ="text" name="celsius"> <input type ="button" value=" Los " onclick="celtofar(this.form)"> *<input type ="reset" value=" Reset "> </TD></TR></TABLE> </form>
|