How To Convert From Fahrenheit To Celsius Using Javascript

admin_img Posted By Bajarangi soft , Posted On 21-11-2020

We can convert Temperature fahrenheit to Celcius using javascript,So today we implement javascript to convert Fahrenheit To Celsius.

How To Convert From Fahrenheit To Kelvin Using Javascript

Complete Code For Converting From Fahrenheit To Celsius Using Javascript

<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>How To Convert From Stones To Grams Using Javascript</title>
    <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">
</head>
<style>
    body {
        background: cadetblue;
    }
</style>
<body>
<body>
<div class="container">
    <br/><br/>
    <div class="text-center">
        <h1 id="color" style="color: white;">Convert From Stones To Grams Using Javascript</h1>
    </div>

    <div class="well">
        <p>
            <label>Fahrenheit</label>
            <input id="inputFahrenheit" type="number" placeholder="Fahrenheit" oninput="temperatureConverter(this.value)" onchange="temperatureConverter(this.value)">
        </p>
        <p>Celcius: <span id="outputCelcius"></span></p>

        <script>
            function temperatureConverter(valNum) {
                valNum = parseFloat(valNum);
                document.getElementById("outputCelcius").innerHTML=(valNum-32)/1.8;
            }
        </script>
    </div>
</div>
</body>
</html>

Related Post