helsinkihammer
10-28-2003, 09:09 AM
This code converts from Fahrenheit to Celcius and works fine, but I'd like it to rounding up the answer to the nearest whole number. Any suggestions?
<script language="JavaScript">
<!-- hide this script from old browsers
function temp(form)
{
var f = parseFloat(form.DegF.value, 10);
var c = 0;
c = (f - 32.0) * 5.0 / 9.0;
form.DegC.value = c;
}
// done hiding from old browsers -->
</script>
The degree celcius value = c
Many thanks in advance to you generous people :)
Mark
<script language="JavaScript">
<!-- hide this script from old browsers
function temp(form)
{
var f = parseFloat(form.DegF.value, 10);
var c = 0;
c = (f - 32.0) * 5.0 / 9.0;
form.DegC.value = c;
}
// done hiding from old browsers -->
</script>
The degree celcius value = c
Many thanks in advance to you generous people :)
Mark