Javascript Temperature calculator is used to convert from fahrenheit to celsius and also convert from celsius to fahrenheit.Its mainly used for temperature conversion. Enter the degree to textbox,select the option from combobox and then find out the temperature.
Features
Enter the degree value to the textbox,select the option from combobox either fahrenheit or celsius.
Calculate and then produce the result with two decimal places.
This is free javascript calculator.
Copy the code from given textarea and use this calculator.
Preview
Enter the degree to the Textbox and select option from combobox then calculate the temperature from fahrenheit to celsius and vice versa.
Downloads
Javascript Code
<!-- Script by hscripts.com --> <!-- More scripts @www.hscripts.com --> <script type="text/javascript"> function apply() { var a=frm.myoption.value; if(a=="Fahrenheit") { var val=frm.txt.value; var tf=parseInt(val); var tc=(5/9)*(tf-32); var res=Math.round(tc*Math.pow(10,2))/Math.pow(10,2); frm.txt1.value=res+" C"; } else { var val=frm.txt.value; var tc=parseInt(val); var tf=((9/5)*tc)+32; var res1=Math.round(tf*Math.pow(10,2))/Math.pow(10,2); frm.txt1.value=res1+" F"; } } </script><!-- Script by hscripts.com -->
For customization of this script or any script development, mail to support@hscripts.com
Usage
Copy the javascript code into the head part of your HTML page.
Create a HTML form using the above HTML code.
Here, the function "chkdecimals()" is called to give the value with two decimalplaces. The function "apply()" is called to calculate from fahrenheit to celsius and vice versa.
Copy the code into your page and use this calculator.