How To Convert From Pounds To Stones Using Javascript

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

we can Convert from Pounds to Stones using formula stones=pounds*0.071429 and we use this logical with javascript .So today we discuss how to Pounds to Stones using javascript

How To Convert From Pounds To Stones Using Javascript

Complete Code For Converting From Pounds To Stones Using Javascript.

<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>How To Convert From Pounds To Stones Using Javascript</title>
    <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">
</head>
<style>
    body {
        background: black;
    }

    h1 {
        color: white;
    }
</style>
<body>
<body>
<div class="container">
    <br/><br/>
    <div class="text-center">
        <h1 id="color" style="color: White;">Convert From Pounds To Stones Using Javascript</h1>
    </div>


    <div class="well">
        <p>
            <label>Pounds</label>
            <input id="inputPounds" type="number" placeholder="Pounds" oninput="weightConverter(this.value)"
                   onchange="weightConverter(this.value)">
        </p>
        <h2>Stones: <span id="outputStones"></span></h2>

        <script>
            function weightConverter(valNum) {
                document.getElementById("outputStones").innerHTML = valNum * 0.071429;
            }
        </script>
    </div>
</div>

</body>
</html>

Related Post