»
Tiếng AnhTiếng PhápTiếng Việt

In - Đổi đơn vị chiều dài - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Tính toán » Tương đương » Đổi đơn vị chiều dài
URL: https://www.javascriptbank.com/length-equivalents.html

Đổi đơn vị chiều dài © JavaScriptBank.comHiệu ứng tạo ra bảng đổi các đơn vị chiều dài với nhau.

Phiên bản đầy đủ: jsB@nk » Tính toán » Tương đương » Đổi đơn vị chiều dài
URL: https://www.javascriptbank.com/length-equivalents.html



CSS
<style>td{text-align: center;}</style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT language=JavaScript><!-- Original:  Cut-N-Paste JavaScript<!-- Beginfunction initArray() {this.length = initArray.arguments.length;for (var i = 0; i < this.length; i++) {this[i] = initArray.arguments[i];   }}var isn01 = new initArray("4b","5b","8b","8b");isn01[0] = "~01~10.3937~20.03281~30.01094~40.01~50.0004971~60.00001~70.000006214~8";isn01[1] = "~02.540~11~20.08333~30.02778~40.0254~50.001263~60.0000254~70.00001578~8";isn01[2] = "~030.48~112~21~30.3333~40.3048~50.01515~60.0003048~70.0001894~8";isn01[3] = "~091.44~136~23~31~40.9144~50.04545~60.0009144~70.0005682~8";isn01[4] = "~0100~139.37~23.281~31.0936~41~50.04971~60.001~70.0006214~8";isn01[5] = "~02012~1792~266~322~420.12~51~60.0212~70.0125~8";isn01[6] = "~0100000~139370~23281~31093.6~41000~549.71~61~70.6214~8";isn01[7] = "~0160934~163360~25280~31760~41609~580~61.609~71~8";function lenCon() {for (var i = 0; i < 8; i++) {if (document.isnform01.leni[i].checked) {leni = i;leninm = document.isnform01.leni[i].value;   }}for (var i = 0; i < 8; i++) {if (document.isnform01.leno[i].checked) {leno = i;lenonm = document.isnform01.leno[i].value;   }}useri = document.isnform01.leninp.value;if (useri == 0) {useri = 1;document.isnform01.leninp.value = useri;}mulstr = isn01[leni];picker = "~" + leno;ps = mulstr.indexOf(picker);leno++;picker = "~" + leno;ps1 = mulstr.indexOf(picker);mulstr = mulstr.substring((ps + 2),ps1);ps = (useri * mulstr);picker = "";picker += psps1 = picker.indexOf(".");if (ps1 > -1) {ps = ps + .000001; picker = "";picker += ps;ps2 = picker.indexOf("e");if (ps2 < 0) {picker = picker.substring(0,(ps1 + 6));}if (ps2 == 0 || ps2 > 0) {ps3 = picker.indexOf("00000");if (ps3 > 0) {picker = picker.substring(0,ps3 + 1) + picker.substring(ps2,picker.length);      }   }}picker = useri + " " + leninm + " = " + picker + " " + lenonmdocument.isnform01.lenout.value = picker;}// End --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form name=isnform01><TABLE border=1 width=486 align=center>  <TBODY>  <TR>    <TD colSpan=9>      <P align=center><B>Type a number </B><INPUT name=leninp onchange=lenCon(); size=30><FONT       face=Tahoma size=1><BR>&nbsp;</P></TD></TR>  <TR>    <TD><B>From:</B></TD>    <TD>Centimeters<BR><INPUT       CHECKED name=leni onclick="" type=radio value=Centimeters></TD>    <TD>Inches<BR><INPUT name=leni       onclick="" type=radio value=Inches></TD>    <TD>Feet<BR><INPUT name=leni       onclick="" type=radio value=Feet></TD>    <TD>Yards<BR><INPUT name=leni       onclick="" type=radio value=Yards></TD>    <TD>Meters<BR><INPUT name=leni       onclick="" type=radio value=Meters></TD>    <TD>Chains<BR><INPUT name=leni       onclick="" type=radio value=Chains></TD>    <TD>Kilometers<BR><INPUT       name=leni onclick="" type=radio value=Kilometers></TD>    <TD>Miles<BR><INPUT name=leni       onclick="" type=radio value=Miles></TD></TR>  <TR>    <TD><B>To:</B></TD>    <TD>Centimeters<BR><INPUT       name=leno onclick="" type=radio value=Centimeters></TD>    <TD>Inches<BR><INPUT CHECKED       name=leno onclick="" type=radio value=Inches></TD>    <TD>Feet<BR><INPUT name=leno       onclick="" type=radio value=Feet></TD>    <TD>Yards<BR><INPUT name=leno       onclick="" type=radio value=Yards></TD>    <TD>Meters<BR><INPUT name=leno       onclick="" type=radio value=Meters></TD>    <TD>Chains<BR><INPUT name=leno       onclick="" type=radio value=Chains></TD>    <TD>Kilometers<BR><INPUT       name=leno onclick="" type=radio value=Kilometers></TD>    <TD>Miles<BR><INPUT name=leno       onclick="" type=radio value=Miles></TD></TR>  <TR>    <TD colSpan=9><INPUT onclick=lenCon(); style="FONT-FAMILY: Tahoma" type=button value="Convert">       <FONT face=Tahoma size=1><INPUT style="FONT-FAMILY: Tahoma" type=reset value="Reset"><BR><INPUT       name=lenout onclick=lenCon(); size=60> </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-->