- click outside the text box, or
- press the tab key.
This script converts from celcius to farhenheit and vice versa.
Код скрипта
<HTML>
<HEAD>
<TITLE>Temperature Coversion</TITLE>
<BODY BGCOLOR="WHITE">
Enter a number in either field, then
<ul><li>click outside the text box, or
<li>press the tab key.
</ul>
<form>
F: <input type="text" name="F" value="32"
onChange="eval('C.value = ' + this.form.C_expr.value)">
<input type="hidden" name="F_expr" value="(212-32)/100 * C.value + 32 ">
<br>
C: <input type="text" name="C" value="0"
onChange="eval('F.value = ' + this.form.F_expr.value)">
<input type="hidden" name="C_expr" value="100/(212-32) * (F.value - 32 )">
<br>
<input type=reset name=reset value=reset>
</form>
<P>
This script converts from celcius to farhenheit and vice versa.