»
EnglishFrenchVietnamese

Print - Fahrenheit to Cel. Converter - JavaScriptBank.com

Full version: jsB@nk » Calculation » Equivalent » Fahrenheit to Cel. Converter
URL: http://www.javascriptbank.com/fahrenheit-to-cel-converter.html

Fahrenheit to Cel. Converter © JavaScriptBank.comThis JavaScript will convert celsius to fahrenheit or fahrenheit to celsius, all you have to do is fill in the prompts and the conversion will appear in an alert box!

Full version: jsB@nk » Calculation » Equivalent » Fahrenheit to Cel. Converter
URL: http://www.javascriptbank.com/fahrenheit-to-cel-converter.html



HTML
<SCRIPT LANGUAGE="JavaScript">// Lav Mir<!-- Beginvar themethod= prompt("Please enter celsius to fahrenheit(c to f) or fahrenheit to celsius(f to c)", "Not case sensitive")var thenewmethod= themethod.toLowerCase()function f2c(fahrenheit1){var answer ;celsius1= 5/9 * (fahrenheit1 - 32)  return ;}function c2f(celsius2){var answer ;var fahrenheit2 ; fahrenheit2= 9/5 * celsius2 + 32return fahrenheit2 ;}switch (thenewmethod){case "f to c":var thefahrenheit= prompt("Please enter the degrees in fahrenheit", " ") ; f2c(thefahrenheit);answer= celsius1 ;alert(thefahrenheit + "  is " + answer)break;case "c to f":var thecelsius= prompt("Please enter the degrees in celsius", " ")var result= c2f(thecelsius);alert(+ thecelsius + " is " + result) ; break;default:document.write("Please reload the page as there was an error")break;}//  End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->