<script
language="javascript"
type="text/javascript">
function
displayTemp(){
if
(document.Zero.elements[1].checked){
var
tempVal =
document.Zero.yourInput.value
var
finalC =
(tempVal-32)*5/9
var
finalTemp =
Math.round(finalC)
+
" degrees Celcius"
}
if
(document.Zero.elements[2].checked){
var
tempVal =
document.Zero.yourInput.value
var
finalF =
(tempVal*9/5)+32
var
finalTemp =
Math.round(finalF)
+
" degrees Fahrenheit"
}
document.buttons.result.value
=
finalTemp;
}
</script>
<FORM
name="Zero"
id="Zero">
<INPUT
TYPE="text"
name="yourInput"
size=8
value=""
onChange="displayTemp();">
<INPUT
TYPE="radio"
Name="F"
Size=1
onclick="displayTemp();">Fahrenheit
<INPUT
TYPE="radio"
Name="F"
Size=1
onclick="displayTemp();">Celsius
</FORM>
<P>
<FORM
name=buttons>
<Br>
Is Equal to:
<INPUT
TYPE="text"
Name="result"
Size=30
Value="">
</FORM>