Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <title>KPH to MPH Speed Converter</title> <body> <h2>Speed Converter</h2> <p>Type a value in the KPH field to convert the value to MPH:</p> <p> <label>KPH</label> <input id="inputKPH" type="number" placeholder="KPH" oninput="speedConverter(this.value)" onchange="speedConverter(this.value)"> </p> <p>MPH: <span id="outputMPH"></span></p> <script> function speedConverter(valNum) { document.getElementById("outputMPH").innerHTML=valNum/1.609344; } </script> </body> </html>