<html>
<head>
<title> Fun with Text Boxes </title>
<script type="text/javascript">
function FahrToCelsius(tempInFahr)
{
return (5/9)*(tempInFahr - 32);
}
</script>
</head>
<body>
<form name="BoxForm">
Temperature in Fahrenheit:
<input type="text" name="Fahr" size=10 value="0"
onChange="document.BoxForm.Celsius.value =
FahrToCelsius(parseFloat(document.BoxForm.Fahr.value));" />
<tt>----></tt>
<input type="text" name="Celsius" size=10 value="" />
in Celsius
</form>
</body>
</html>
<head>
<title> Fun with Text Boxes </title>
<script type="text/javascript">
function FahrToCelsius(tempInFahr)
{
return (5/9)*(tempInFahr - 32);
}
</script>
</head>
<body>
<form name="BoxForm">
Temperature in Fahrenheit:
<input type="text" name="Fahr" size=10 value="0"
onChange="document.BoxForm.Celsius.value =
FahrToCelsius(parseFloat(document.BoxForm.Fahr.value));" />
<tt>----></tt>
<input type="text" name="Celsius" size=10 value="" />
in Celsius
</form>
</body>
</html>

Post a Comment