CS101 ASSIGNMENT NO#3 SOLUTION

17:52 0 Comments

<!-- sharaz ghouri  developer-->

<html>
<head>
<title>CS101 Assignment no3</title>
<!-- scrip formula for convert fn to c and k-->
<script>
function formula(){
var input= document.ftocandk.fvalue.value;

var celuis=(input-32)*5/9;

var kelvin=(input-32)*5/9+273.15;

if((document.ftocandk.fvalue.value.length)<1)
{
 window.alert('Please! enter any value in farenhit value');

}
else
{

document.ftocandk.cvalue.value=celuis;
document.ftocandk.kvalue.value=kelvin;
}
}
</script>

</head>
<body>

<h1 style="background-color:blue" align="center">Pakistan Metrological Department</h1>

<p style="background-color:deepskyblue">You are welcome to online temperature converter.
 Here is a simple Fahrenheit temprature converter. You can enter Fahrenheit values and get converted values <br>
into Celsius and Kelvin as per your requrement</p>

<form name="ftocandk" method="post" action="">
<table>
<tr>
<td>Fahrenheit :</td><td><Input type="text" name="fvalue" size="30%" >
<td>
</tr>
<tr>
<td>Celuis : </td><td><input type="text" name="cvalue" size="30%" value=0.00></td>
</tr>
<tr>
<td>Kelvin :</td><td><input type="text" name="kvalue" size="30%" value=0.00></td>
</tr>
<tr>
<td></td>
<td align="left" colspan="2" ><input type="button" name"convert" value="convert" onCLick=formula()>
<input type="reset" name="reset" value="Reset Form"></td>
</tr>
</table>
</form>

<p>To clear your form for new conversion you can press the &quotReset Form&quot button and all values will
 be erased from fields</p>
<body>
</html>

<!-- END-->
CS101 Assignment no3

Pakistan Metrological Department

You are welcome to online temperature converter. Here is a simple Fahrenheit temprature converter. You can enter Fahrenheit values and get converted values
into Celsius and Kelvin as per your requrement
Fahrenheit :
Celuis :
Kelvin :
To clear your form for new conversion you can press the &quotReset Form&quot button and all values will be erased from fields

Unknown

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard.

0 comments:

Facebook