»
AnglaisFranaisVietnamien

Imprimer - Circle Solver - JavaScriptBank.com

Version complte: jsB@nk » Calcul » Math » Circle Solver
URL: http://www.javascriptbank.com/circle-solver.html

Circle Solver © JavaScriptBank.comJe ne m'en souviens pas des formules pour les deux autres parties d'un cercle (surface, le diamètre ou la circonférence) lorsque vous ne connaissez une? Pour le sauvetage est Circle Solver. Entrez dans le cercle de la zone, le diamètre ou la circonférence et il va résoudre pour les deux autres! Super!

Version complte: jsB@nk » Calcul » Math » Circle Solver
URL: http://www.javascriptbank.com/circle-solver.html



JavaScript
<SCRIPT LANGUAGE="JavaScript">// Author Chris Brown<!-- Beginfunction circle(form,changed) {with (Math) {var area = form.area.value;var diameter = form.diameter.value;var circumference = form.circumference.value;if (changed == "area") {var radius = sqrt(area / PI);diameter = 2 * radius;circumference = PI * diameter;}if (changed == "diameter") {area = PI * (diameter / 2) * (diameter / 2);circumference = PI * diameter;}if (changed == "circumference") {diameter = circumference / PI;area = PI * (diameter / 2) * (diameter / 2);       }form.area.value = area;form.diameter.value = diameter;form.circumference.value = circumference;  }}var toDegrees = 360 / (Math.PI * 2);var toRadians = (Math.PI * 2) / 360;//  End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form method=post><table border="5" align=center><tr><td align=center>Area:</td><td align=center><input type=text name=area size=6 value=0  onFocus="select()"></td><td align=center><input type=button value="Solve Others" onClick="circle(this.form,'area')"></td></tr><tr><td align=center>Diameter:</td><td align=center><input type=text name=diameter size=6 value=0 onFocus="select()"></td><td align=center><input type=button value="Solve Others" onClick="circle(this.form,'diameter')"></td></tr><tr><td align=center>Circumference:</td><td align=center><input type=text name=circumference size=6 value=0 onFocus="select()"></td><td align=center><input type=button value="Solve Others" onClick="circle(this.form,'circumference')"></td></tr></table> </form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->