Height Units Converter
function convert() { var inches = document.getElementById(“inches”).value; var feet = document.getElementById(“feet”).value; var centimeters = document.getElementById(“centimeters”).value; if (inches) { // Convert inches to feet and centimeters feet = inches / 12; centimeters = inches * 2.54; document.getElementById(“feet”).value = feet; document.getElementById(“centimeters”).value = centimeters; } else if (feet) { // Convert feet to inches and centimeters inches = feet * 12; centimeters = feet * 30.48; document.getElementById(“inches”).value = inches; document.getElementById(“centimeters”).value = centimeters; } else if (centimeters) { // Convert centimeters to inches and feet inches = centimeters / 2.54; feet = centimeters / 30.48; document.getElementById(“inches”).value = inches; document.getElementById(“feet”).value = feet; } } function clearFields() { document.getElementById(“inches”).value = “”; document.getElementById(“feet”).value = “”; document.getElementById(“centimeters”).value = “”; }
Check out the free tools we have available for you:
Calories daily intake calculator
Basal Metabolic Rate (BMR) Calculator