运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <title>cm to Yards Length Converter</title> <body> <h2>Length Converter</h2> <p>Type a value in the cm field to convert the value to Yards:</p> <p> <label>cm</label> <input id="inputcm" type="number" placeholder="cm" oninput="LengthConverter(this.value)" onchange="LengthConverter(this.value)"> </p> <p>Yards: <span id="outputYards"></span></p> <script> function LengthConverter(valNum) { document.getElementById("outputYards").innerHTML=valNum*0.010936; } </script> </body> </html>