Ans: See the MilesToCm Example.
Ans: See the WazUp Example.
Control Definition:
Accessing Control Value:
c = parseFloat(document.frmTemperature.txtCelsius.value);
Control Definition:
Accessing Control Value:
c = parseFloat(document.getElementById("txtCelsius").value);
<head>
<title>Title goes here</title>
<style type="text/css">
... Document-level style goes here.
</style>
<script type="text/javascript">
function convert( )
{
var c, f;
c = parseFloat(document.frmA.txtC.value);
f = 9 * c / 5 + 32;
document.frmA.txtF.value = f;
}
</script>
</head>
<input type="button" name="btnConvert" value="Convert" onclick="convert( );" />