[go: up one dir, main page]

0% found this document useful (0 votes)
28 views2 pages

It Java Celcius

The document contains an HTML page with JavaScript functions to convert temperatures between Celsius and Fahrenheit. It includes input fields for users to enter temperatures and buttons to trigger the conversion functions. The results are displayed using document.write, showing the converted temperature values.

Uploaded by

dhairysheel2394
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views2 pages

It Java Celcius

The document contains an HTML page with JavaScript functions to convert temperatures between Celsius and Fahrenheit. It includes input fields for users to enter temperatures and buttons to trigger the conversion functions. The results are displayed using document.write, showing the converted temperature values.

Uploaded by

dhairysheel2394
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

<html>

<head>

<script type="text/javascript">

function get_Fahrenheit()

var c = parseInt(document.getElementById('c1').value);

var f;

f = c/5*(9)+32;

document.write("Fahrenheit : "+f);

function get_Celsius()

var f = parseInt(document.getElementById('f1').value);

var c;

c = ((f-32)/9)*5;

document.write("Celsius : "+c);

</script>

</head>

<body>

<input type="text" id="c1" placeholder="Temperature in


Celsius">

<input type="submit" onclick="get_Fahrenheit()">

<br>

<input type="number" id="f1" placeholder="Temperature in


Fahrenheit">

<input type="submit" onclick="get_Celsius()">


</body>

</html>

You might also like