»
EnglishFrenchVietnamese

Print - Velocity Calculator - JavaScriptBank.com

Full version: jsB@nk » Calculation » Equivalent » Velocity Calculator
URL: https://www.javascriptbank.com/velocity-calculator.html

Velocity Calculator © JavaScriptBank.comAnother way to use JavaScript to find velocity equivalents.

Full version: jsB@nk » Calculation » Equivalent » Velocity Calculator
URL: https://www.javascriptbank.com/velocity-calculator.html



CSS
<style>.cont TD{text-align: center;vertical-align: top;}</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 type=text/javascript><!-- function initArray() {this.length = initArray.arguments.length;for (var i = 0; i < this.length; i++) {this[i] = initArray.arguments[i];   }}var isn07 = new initArray("4b","5b","8b","8b");isn07[0] = "~01~10.01~20.6~30.036~40.03281~51.9685~60.02237~70.01944~8";isn07[1] = "~0100~11~260~33.6~43.281~5196.85~62.237~71.944~8";isn07[2] = "~01.66667~10.016667~21~30.06~40.05468~53.281~60.03728~70.03240~8";isn07[3] = "~027.78~10.2778~216.6667~31~40.9113~554.68~60.6214~70.53996~8";isn07[4] = "~030.48~10.3048~218.29~31.097~41~560~60.68181818~70.59248~8";isn07[5] = "~00.5080~10.00508~20.3048~30.01829~40.016667~51~60.01136~70.00987~8";isn07[6] = "~044.7~10.447~226.82~31.609~41.467~588~61~70.86898~8";isn07[7] = "~051.44~10.5144~230.87~31.852~41.688~5101.3~61.151~71~8";function velCon() {for (var i = 0; i < 8; i++) {if (document.isnform07.veli[i].checked) {veli = i;velinm = document.isnform07.veli[i].value;   }}for (var i = 0; i < 8; i++) {if (document.isnform07.velo[i].checked) {velo = i;velonm = document.isnform07.velo[i].value;   }}useri = document.isnform07.velinp.value;if (useri == 0) {useri = 1;document.isnform07.velinp.value = useri;}mulstr = isn07[veli];picker = "~" + velo;ps = mulstr.indexOf(picker);velo++;picker = "~" + velo;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 + " " + velinm + " = " + picker + " " + velonmdocument.isnform07.velout.value = picker;}// --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<FORM name=isnform07><TABLE border=1 class=cont>  <TBODY>  <TR>    <TH colSpan=10>      <FONT color=blue>Velocity Equivalents</FONT></TH></TR>  <TR>    <TD vAlign=top colSpan=10><STRONG>First, type the number you wish converted here: </STRONG><INPUT onchange=velCon(); size=30       name=velinp><BR><STRONG>Then click radio buttons for desired conversion:</STRONG></TD></TR>  <TR>    <TD><FONT color=red><STRONG>From:</STRONG></FONT></TD>    <TD>cm/sec<BR><INPUT onclick="" type=radio CHECKED       value=cm/sec name=veli></TD>    <TD>m/sec<BR><INPUT onclick="" type=radio       value=m/sec name=veli></TD>    <TD>m/min<BR><INPUT onclick="" type=radio       value=m/min name=veli></TD>    <TD>km/hr<BR><INPUT onclick="" type=radio       value=km/hr name=veli></TD>    <TD>ft/sec<BR><INPUT onclick="" type=radio       value=ft/sec name=veli></TD>    <TD>ft/min<BR><INPUT onclick="" type=radio       value=ft/min name=veli></TD>    <TD>mi/hr<BR><INPUT onclick="" type=radio       value=mi/hr name=veli></TD>    <TD>Knots<BR><INPUT onclick="" type=radio       value=Knots name=veli></TD>  <TR>    <TD><FONT color=red><STRONG>To:</STRONG></FONT></TD>    <TD>cm/sec<BR><INPUT onclick="" type=radio       value=cm/sec name=velo></TD>    <TD>m/sec<BR><INPUT onclick="" type=radio CHECKED       value=m/sec name=velo></TD>    <TD>m/min<BR><INPUT onclick="" type=radio       value=m/min name=velo></TD>    <TD>km/hr<BR><INPUT onclick="" type=radio       value=km/hr name=velo></TD>    <TD>ft/sec<BR><INPUT onclick="" type=radio       value=ft/sec name=velo></TD>    <TD>ft/min<BR><INPUT onclick="" type=radio       value=ft/min name=velo></TD>    <TD>mi/hr<BR><INPUT onclick="" type=radio       value=mi/hr name=velo></TD>    <TD>Knots<BR><INPUT onclick="" type=radio       value=Knots name=velo></TD>  <TR>    <TD colSpan=10><INPUT onclick=velCon(); type=button value=" Click for Conversion "> <INPUT type=reset value=" Reset Values "><BR><INPUT onclick=velCon();       size=60 name=velout> </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-->