In: Computer Science
Below is the solution:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Converter</title>
<meta charset="UTF-8">
<style>
#container {
margin: 0 auto;
width: 400px;
padding: 100px;
margin-top: 200px;
}
</style>
</head>
</body>
<div id="container">
<h1>Converter</h1>
Enter value in Fahreheight: <input id="fahrenheit" type="text"><br><br>
Enter value in Celcius: <input id="celcius" type="text"><br><br>
Enter value in Meter: <input id="meter" type="text"><br><br>
Enter value in Pound: <input id="feet" type="text"><br><br>
<input value="add" type="button" onClick="addLabelTextBox()">
</div>
</body>
<script>
//declare variable
var fahrenheit = document.getElementById('fahrenheit').value; //take value by id
var celcius = document.getElementById('celcius').value; //take value by id
var meter = document.getElementById('meter').value; //take value by id
var feet = document.getElementById('feet').value; //take value by id
function addLabelTextBox() { //call function
convertToCelcius = (fahrenheit - 32) * 0.5555; //convert to celcius
convertToFahreheight = (celcius * 1.8) + 32; //convert to fahrenheight
convertToFeet = (meter * 3.28084); //convert to feet
convertToMeter = (feet * 0.3048); //convert to meter
//display the all values
alert("Temptarue of Fahrenheight is " + fahrenheit + " into celcius is : " + convertToCelcius + " \n Temptarue of Celcius is " + celcius + " into Fahrenheight is : " + convertToFahreheight + "\n Meter of " + meter + " in Feet is: " + convertToFeet + "\n Feet of " + feet + " in Metet is: " + convertToMeter);
}
</script>
</html>
sample output: