• Page 1 of 1
  • 1
Archive - read only
uCause Community » Trash & Archives » Trash » Temperature Converter
Temperature Converter
DevilDate: Saturday, 2011-11-19, 10:57 PM | Message # 1
Member
Group: Senior Members
Messages: 55
Awards: 1
Reputation: 3
Status: :-(
Description: A very handy script that instantly coverts between the major temperature units Fahrenheit, Celsius, and Kelvin.

Code
<!--
Tempature Converter
By Kai Yuet (kaiy911@hotmail.com)
For this script and more,
Visit http://javascriptkit.com
-->

<FORM>
Fahrenheit:<INPUT TYPE="text" NAME="F" VALUE="" SIZE="6" MAXLENGTH="6" onChange="eval('C.value = ' + this.form.C_expr.value);eval('K.value = ' + this.form.K_expr.value)">
               <INPUT TYPE="hidden" NAME="F_expr" VALUE="(Math.round(((212-32)/100 * C.value + 32)*100))/100;">
<INPUT TYPE="hidden" NAME="F_expr2" VALUE="(Math.round(((212-32)/100 *(K.value - 273) + 32)*100))/100; ">
  Celsius:<INPUT TYPE="text" NAME="C" VALUE="" SIZE="6" MAXLENGTH="6" onChange="eval('F.value = ' + this.form.F_expr.value);eval('K.value = ' + this.form.K_expr.value)">
               <INPUT TYPE="hidden" NAME="C_expr" VALUE="(Math.round((100/(212-32) * (F.value - 32))*100))/100"> <INPUT TYPE="hidden" NAME="C_expr2" VALUE="(Math.round(K.value - 273))"> 
Kelvin:<INPUT TYPE="text" NAME="K" VALUE="" SIZE="6" MAXLENGTH="6" onChange="eval('F.value = ' + this.form.F_expr2.value);eval('C.value = ' + this.form.C_expr2.value)">
               <INPUT TYPE="hidden" NAME="K_expr" VALUE="(Math.round((100/(212-32) * (F.value - 32))*100))/100 + 273"> 
    
<INPUT TYPE="button" NAME="Reset" VALUE="Submit">
<INPUT TYPE="Reset" NAME="Reset" VALUE="Reset">
</FORM>
tags-zB11Temperature, Converter
 
0 Thanked you For This Useful Post:
SirDarknight(Tonmoy)Date: Sunday, 2011-11-20, 7:06 AM | Message # 2
Member
Group: Senior Members
Messages: 894
Awards: 10
Reputation: 15
Status: :-(
I've already posted this

Please Give Me A Award or + Rep If My Post Helps You

Please Give Me A Award or + Rep If You Like my Scripts
 
0 Thanked you For This Useful Post:
uCause Community » Trash & Archives » Trash » Temperature Converter
  • Page 1 of 1
  • 1
Search:


"Making uCoz web designs simple and easy to use"
- uCause Developers