Example
<!DOCTYPE html>
<html>
<head>
<title>Fahrenheit From Celsius</title>
</head>
<body>
<script>
var cTemp = 100; // temperature in Celsius
// Let's be generous with parentheses
var hTemp = ((cTemp * 9) /5 ) + 32;
document.write("Temperature in Celsius: " + cTemp + " degrees<br/>");
document.write("Temperature in Fahrenheit: " + hTemp + " degrees");
</script>
</body>
</html>
Most Helpful This Week
How to change text after click event using JavaScript?
How to check if an element or HTML tag exists using JavaScript?
How to change the height of Textarea on click?
Generate random password for form field on click using JavaScript
How to define Global Variable in JavaScript?
Image Rollover Using onMouseOver and onMouseOut