Phiên bản đầy đủ: jsB@nk » Tính toán » Toán học » Tính diện tích 2
URL: https://www.javascriptbank.com/area-calc.html
Tính diện tích của một số hình trong toán học.
Phiên bản đầy đủ: jsB@nk » Tính toán » Toán học » Tính diện tích 2
URL: https://www.javascriptbank.com/area-calc.html
<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-->
<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-->