Convert Feet to cm Using JavaScript

Hello friends, today I will tell you through this tutorial how you can convert feet to cm length using javascript code.This is the script code of javascript in which you have been told how you can convert feet to cm length.

<script>
function LengthConverter(valNum) {
document.getElementById("outputcm").innerHTML=valNum/0.032808;
}
</script>

This is the script code of html, in which you have been told the code to create the structure of the front.And also added the code of the script.

feet-to-cm-converter.html

<!DOCTYPE html>
<html>
<title>Feet to cm Length Converter</title>
<body>
<h2>Feet to cm Length Converter</h2>
<p>Type a value in the Feet field to convert the value to cm:</p>
<p>
<label>Feet</label>
<input id="inputFeet" type="number" placeholder="Feet" oninput="LengthConverter(this.value)" onchange="LengthConverter(this.value)">
</p>
<p>cm: <span id="outputcm"></span></p>
<script>
function LengthConverter(valNum) {
document.getElementById("outputcm").innerHTML=valNum/0.032808;
}
</script>
</body>
</html>