postheadericon 7. Write a JavaScript to convert Celsius to Fahrenheit.




<html>
<head>
<title>EX-7: WTAD : www.bipinrupadiya.com</title>
<script type="text/javascript">
function convert(a)
{
var F=(a-32) * 5 / 9;
document.getElementById("far").innerHTML=a + ' Celsius = ' + F + ' Farenheit';
}
</script>
</head>
<body>
<br>Enter Celsius : <input type="text" id="txt" onkeyup="convert(this.value)">
<div id="far"></div>
</body>
</html>

0 comments:

Follow by Email

Blog Archive

Total Pageviews

© BipinRupadiya.com. Powered by Blogger.