»
EnglishFrenchVietnamese

Print - Convert Measures-Customary Length - JavaScriptBank.com

Full version: jsB@nk » Calculation » Equivalent » Convert Measures-Customary Length
URL: https://www.javascriptbank.com/convert-measures-customary-length.html

Convert Measures-Customary Length © JavaScriptBank.comScript allows to convert units from one to another. Simply choose the unit you want to use, type the value in the field next to it, and click the 'Calculate' button.

Full version: jsB@nk » Calculation » Equivalent » Convert Measures-Customary Length
URL: https://www.javascriptbank.com/convert-measures-customary-length.html



JavaScript
<script language="javascript">function cliner(){a=document.cline.mi.value;b=document.cline.yd.value;c=document.cline.ft.value;d=document.cline.inc.value;if(a != ""){//document.cline.mi.value=a/.1;document.cline.yd.value=a*1760;document.cline.ft.value=a*1760*3;document.cline.inc.value=a*1760*3*12;}if(b != ""){document.cline.mi.value=b/1760;//document.cline.yd.value=b/.1;document.cline.ft.value=b*3;document.cline.inc.value=b*3*12;}if(c != ""){document.cline.mi.value=c/3/1760;document.cline.yd.value=c/3;//document.cline.ft.value=c/.1;document.cline.inc.value=c*12;}if(d != ""){document.cline.mi.value=d/12/3/1760;document.cline.yd.value=d/12/3;document.cline.ft.value=d/12;//document.cline.inc.value=d/.1;}}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form name="cline"><table width="50%" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td colspan="2" bgcolor="#c8f2bf"><font size="+2"><center>Convert <i>within</i> the Customary System - Length</center></font><b><center><font size="+1">Enter your measure in the appropriate box and click on the <i>calculate</i> button to see the comparisons:</font></center></b></td></tr><tr><td align="center" width="60%"><b>Miles</b></td><td align="center" bgcolor="#bed7d8"><input type="text" name="mi" size="16" value=""></td></tr><tr><td align="center"><b>Yards</b></td><td align="center" bgcolor="#bed7d8"><input type="text" name="yd" size="16" value=""></td></tr><tr><td align="center"><b>Feet</b></td><td align="center" bgcolor="#bed7d8"><input type="text" name="ft" size="16" value=""></td></tr><tr><td align="center"><b>Inches </b></td><td align="center" bgcolor="#bed7d8"><input type="text" name="inc" size="16" value=""></td></tr><tr><td align="center" colspan="2" bgcolor="#c8f2bf"><input type="button" onclick="cliner()" value="Calculate">&nbsp;&nbsp;<input type="reset" value="Reset"><div align="right"> <font size="-2">© Jeff LeMieux, 2002</font> </div></td></tr></tbody></table></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->