»
EnglishFrenchVietnamese

Print - Converting Inches - JavaScriptBank.com

Full version: jsB@nk » Calculation » Equivalent » Converting Inches
URL: https://www.javascriptbank.com/converting-inches.html

Converting Inches © JavaScriptBank.comA inch to others- converter.

Full version: jsB@nk » Calculation » Equivalent » Converting Inches
URL: https://www.javascriptbank.com/converting-inches.html



JavaScript
<script language="Javascript">function milimeters(){inch = document.convert.inches.valueanswer = inch * .0254 * 1000alert(answer)}function centimeters(){inch = document.convert.inches.valueanswer = inch * 2.54alert(answer)}function meters(){inch = document.convert.inches.valueanswer = inch * .0254alert(answer)}function feet(){inch = document.convert.inches.valueanswer = inch / 12alert(answer)}function yards(){inch = document.convert.inches.valueanswer = inch / 36alert(answer)}function safety(){inch = document.convert.inches.value.lengthif(inch >= 20){alert("You Have Too Many Digits.")}}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form name="convert">Enter Inches Here:<br><input type="text" name="inches"><input type="button" value="To Milimeters" onclick="milimeters()" onfocus="safety()"><input type="button" value="To Centimeters" onclick="centimeters()" onfocus="safety()"><input type="button" value="To Meters" onclick="meters()" onfocus="safety()"><input type="button" value="To Feet" onclick="feet()" onfocus="safety()"><input type="button" value="To Yards" onclick="yards()" onfocus="safety()"></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->