January 2001
Beginner
312 pages
6h 4m
English
Consider the following example. This example is closely based on the example you looked at previously:
<html> <head> <title>A Simple Page</title> <script language="JavaScript"> <!-- Cloaking device on! function inputCels() { var cels = prompt("Enter a temperature in Degrees Celsius","Enter a temperature"); ansFah = doFahCalc(cels); alert(cels + " Degrees Celsius is " + ansFah + " Degrees Fahrenheit"); } function inputFah() { var fah = prompt("Enter a temperature in Degrees Fahrenheit","Enter a temperature"); ansCel = doCelCalc(fah); alert(fah + " Degrees Fahrenheit is " + ansCel + " Degrees Celsius"); } function doCelCalc(fah) { var ans = ((Number(fah) - 32) / 1.8); return (ans); } function doFahCalc(cels) ...Read now
Unlock full access