javascript
conversioni e utilità
italiano
english
Tabelle di conversione
scegli una GRANDEZZA
ACCELERAZIONE
ANGOLI
AREA
CALORE, entropia, etc.
ELETTRICITA' e MAGNET.
ENERGIA e LAVORO
FORZA
LUNGHEZZA
LUCE
MASSA e INERZIA
MOMENTO della FORZA
PERMEABILITA'
POTENZA
PRESSIONE
RADIOLOGIA
TEMPERATURA
TEMPO
VELOCITA'
VISCOSITA',dina., cine.
VOLUME, capac. portata
Fattori di conversione in PDF
SELEZIONA
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
V
W
Y
ALL LIST
sistema internazionale
multipli e sottomultipli
costanti fondamentali
unità fondamentali e derivate
tavola periodica
calcolatrice cavalli vapore
BROWSER compatibili
: Explorer - Netscape
<head> <script LANGUAGE="JavaScript"> <!-- Original: Joel Lavarez --> <!-- Web Site: http://www.speed-online.com --> <!-- This script and many more are available free online at --> <!-- The JavaScript Math - http://www.themeter.net --> <!-- Begin var weight, eTime; var horsepower1, horsepower2, horsepower3, horsepower4; var temp1, temp2, temp3, temp4; var speed; var finalhp1, finalhp2, finalhp3, finalhp4, finalhp5, finalhp6; function create(form){ eTime = form.elapsedTime.value; weight = form.vehicleWeight.value; temp1 = eTime / 5.825; temp1 = temp1 * temp1 * temp1; horsepower1 = weight / temp1; finalhp1 = roundOff(horsepower1, 2) horsepower2 = horsepower1 * 1.3; finalhp2 = roundOff(horsepower2, 2) text = "<HEAD><TITLE>1/4 Method</TITLE>"; text += "</HEAD><BODY BGCOLOR=#000000 TEXT=#FFFFFF>"; text += "<font face=arial size=-1><CENTER>"; text += "Horsepower Results - 1/4 Mile Method</CENTER><P>"; text += "Your " +form.carModel.value; text += " weighs about " +form.vehicleWeight.value+ " pounds "; text += "and can complete a 1/4 mile in about "; text += form.elapsedTime.value; text += " seconds. That means that you've got about " +finalhp1; text += " HP at the wheels, and about " + finalhp2; text += " HP at the flywheel.</font>"; text += "<center><form><input type=button onClick='self.close()' "; text += "value='Close Window'></form></center></font>"; resultsWindow=window.open("", "displayWindow", "toolbar=no,menubar=no,scrollbar=auto,resizable=no,width=320,height=180") resultsWindow.document.writeln(text); resultsWindow.document.close(); } function input1(form) { Ctrl = form.carModel; if (Ctrl.value == "") { validatePrompt (Ctrl, "Please Input a Car Model.") return (false); } else return (true); } function input2(form) { Ctrl = form.vehicleWeight; if (Ctrl.value == "") { validatePrompt (Ctrl, "Please enter Your Vehicle Weight in Pounds.") return (false); } else return (true); } function input3(form) { Ctrl = form.elapsedTime; if (Ctrl.value == "") { validatePrompt (Ctrl, "Please enter Your 1/4 mile trapspeed. You can estimate...") return (false); } else return (true); } function runSubmit (form, button) { if (!input1(form)) return; if (!input2(form)) return; if (!input3(form)) return; create(form); return; } function validatePrompt (Ctrl, PromptStr) { alert (PromptStr) Ctrl.focus(); return; } function roundOff(value, precision) { value = "" + value; precision = parseInt(precision); var whole = "" + Math.round(value * Math.pow(10, precision)); var decPoint = whole.length - precision; if(decPoint != 0) { result = whole.substring(0, decPoint); result += "."; result += whole.substring(decPoint, whole.length); } else { result = whole; } return result; } // End --> </script> </head> <body> <form name="hp"> <div align="center"><center><table border="0"> <tr bgcolor="#909090"> <td align="right"><font face="Arial, Helv"><b>Car Model : </b></font></td> <td><input TYPE="text" NAME="carModel" SIZE="20"></td> </tr> <tr bgcolor="#909090"> <td align="right"><font face="Arial, Helv"><b>Vehicle Weight With Driver : </b></font></td> <td><input TYPE="text" NAME="vehicleWeight" SIZE="10"> (in Pounds)</td> </tr> <tr bgcolor="#909090"> <td align="right"><font face="Arial, Helv"><b>Quarter Mile time : </b></font></td> <td><input TYPE="text" NAME="elapsedTime" SIZE="10"> (in seconds)</td> </tr> </table> </center></div><div align="center"><center><p><input type="button" onClick="runSubmit(form)" name="HPcalc" value="Calculate Horsepower"></p> </center></div> </form> </body>
seleziona tutto il codice ed utilizza
copia-incolla
per inserirlo nelle tue pagine
Copyright © 1999 -2010 THEmeter.net -Tutti i diritti riservati -
|
Home
|
Search
|
Disclaimer
|
E-mail
|
Donazioni
|
- www.THEmeter.net -- www.conversioni.it
-
(ver. # 23.03.08 )