»
AnglaisFran�aisVietnamien

Imprimer - Domaine Calculatrice 2 - JavaScriptBank.com

Version compl�te: jsB@nk » Calcul » Math » Domaine Calculatrice 2
URL: https://www.javascriptbank.com/area-calc.html

Domaine Calculatrice 2 © JavaScriptBank.comUn calculatrice simple afin de déterminer l'aire d'un carré, triangle, rectangle, cercle ou sphère.

Version compl�te: jsB@nk » Calcul » Math » Domaine Calculatrice 2
URL: https://www.javascriptbank.com/area-calc.html



JavaScript
<script language="JavaScript">function Circle(form){form.circleanswer.value = form.circleradius.value * form.circleradius.value * 3.14159265}function Rec(form){form.recanswer.value = form.reclength.value * form.recheight.value}function Sphere(form){form.sphereanswer.value = form.sphereradius.value * form.sphereradius.value * 3.14159265 * 4}function Square(form){form.squareanswer.value = form.squarelength.value * form.squarelength.value}function Tri(form){form.trianswer.value = form.tribase.value * form.triheight.value / 2}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form><center><h1>Circle</h1>Enter the radius<input type="text" name="circleradius" size="20"><br><input type="button" value="Find Area" onclick="Circle(this.form)"><br><input type="text" name="circleanswer" size="20">square feet<br><h1>Rectangle</h1>Enter the length of one side<input type="text" name="reclength" size="20"><br>Enter the height of one side<input type="text" name="recheight" size="20"><br><input type="button" value="Find Area" onclick="Rec(this.form)"><br><input type="text" name="recanswer" size="20">square feet<br><h1>Sphere</h1>Enter the radius<input type="text" name="sphereradius" size="20"><br><input type="button" value="Find Area" onclick="Sphere(this.form)"><br><input type="text" name="sphereanswer" size="20">square feet<br><h1>Square</h1>Enter the length of one side<input type="text" name="squarelength" size="20"><br><input type="button" value="Find Area" onclick="Square(this.form)"><br><input type="text" name="squareanswer" size="20">square feet<br><h1>Triangle</h1>Enter the length of the base<input type="text" name="tribase" size="20"><br>Enter the height<input type="text" name="triheight" size="20"><br><input type="button" value="Find Area" onclick="Tri(this.form)"><br><input type="text" name="trianswer" size="20">square feet</center></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->