javascript celsius to fahrenheit

javascript celsius to fahrenheit

GTU WTAD Practical 7 : Write a JavaScript to convert Celsius to Fahrenheit.

javascript celsius to fahrenheit

The Most common and used function to convert your javascript celsius to Fahrenheit and Fahrenheit to Celsius. This kind of conversion is very useful to learn basic understand of operators in any Language. Here I have used this example to demonstrate the use of the javascript celsius to Fahrenheit. This program includes how to use simple operator of JavaScript and how to call the function on button click event.

JavaScript is the most useful client-side programming language. Check out more article about javascript tutorial using any link at the end of an article.

File Name : index.jsp

File Location : Tomcat_Apache\webapps\gtu07\

 

<html>
<head>
<title> GTU WTAD Practical 7 : Write a JavaScript to convert Celsius to Fahrenheit. </title>

<script language=”javascript”>

function gtu_wtad_practical_7(par)
{        //Convert Celsius to Fahrenheit
par.fel.value = par.cel.value*1.8 + 32;
}

</script>
</head>
<body>
<center> <h2> GTU WTAD Practical 7 : Write a JavaScript to convert Celsius to Fahrenheit.  </h2></center>

<form>
Celsius Temperature <input type=”text” size=”10″ name=”cel”>

<input type=”button” name=”b1″ value=”Convert C to F” onClick=”gtu_wtad_practical_7(this.form)”>
<br><br>
Fahrenheit Temperature <input type=”text” size=”10″ name=”fel”>
</form>

</body>
</html>

 

Output

GTU WTAD Practical 7

 

 

 

Adarsh Patel

My Self Adarsh Suryakant Patel. Currently I am working as Assistant Professor at Parul Instiute of Engineering and Technology, MCA Department, Limda, Vadodara. Major Responsibility : * Lectures * Organizing Training and Expert Sessions for * Placement and Recruitment * Faculty Representative