Feet to Meters Length Converter Using JavaScript

Hello friends, today I will tell you through experts php tutorial how you can create converter tool calculate feet to meters length. So let’s try to understand step to step with example.

Here is the javascript code for the feet to length converter.

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

Here is the html code with javascript for the feet to length converter.

lenght.html

<!DOCTYPE html>
<html>
<title>Feet to Meters Length Converter</title>
<body><h2>Length Converter</h2>
<p>Type a value in the Feet field to convert the value to Meters:</p><p>
<label>Feet</label>
<input id="inputFeet" type="number" placeholder="Feet" oninput="LengthConverter(this.value)" onchange="LengthConverter(this.value)">
</p>
<p>Meters: <span id="outputMeters"></span></p>

<script>
function LengthConverter(valNum) {
document.getElementById("outputMeters").innerHTML=valNum/3.2808;
}
</script>
</body>
</html>

Demo

Feet to Meters Length Converter

Length Converter

Type a value in the Feet field to convert the value to Meters:

Meters: