Full version: jsB@nk » Calculation » Math » Area Calculator 1
URL: https://www.javascriptbank.com/area.html
Put a calculator code on your page that can tell a visitor the area units of a Cone, Cube, Cylinder, or a Rectangular Prism.
Full version: jsB@nk » Calculation » Math » Area Calculator 1
URL: https://www.javascriptbank.com/area.html
<script language="JavaScript">function Cone(form){form.an1.value = form.rad.value * form.rad.value * 3.14 * form.height.value / 3}function Cube(form){form.an2.value = form.edge.value * form.edge.value * form.edge.value}function Cyl(form){form.an3.value = form.rad3.value * form.rad3.value * 3.14 * form.height3.value} function Rec(form){form.an4.value = form.length4.value * form.width4.value * form.height4.value}</script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<form><h1>Cone</h1>Enter the radius of the base<input type="text" name="rad" size="20"><br>Enter the height of the cone<input type="text" name="height" size="20"><br><input type="button" value="Find Volume" onclick="Cone(this.form)"><br><input type="text" name="an1" size="20">cubic feet<br><h1>Cube</h1>Enter the length of one edge<input type="text" name="edge" size="20"><br><input type="button" value="Find Volume" onclick="Cube(this.form)"><br><input type="text" name="an2" size="20">cubic feet<br><h1>Cylinder</h1>Enter the radius of the base<input type="text" name="rad3" size="20"><br>Enter the height of the cylinder<input type="text" name="height3" size="20"><br><input type="button" value="Find Volume" onclick="Cyl(this.form)"><br><input type="text" name="an3" size="20">cubic feet<br><h1>Rectangular Prism</h1>Enter the length<input type="text" name="length4" size="20"><br>Enter the width<input type="text" name="width4" size="20"><br>Enter the height<input type="text" name="height4" size="20"><br><input type="button" value="Find Volume" onclick="Rec(this.form)"><br><input type="text" name="an4" size="20">cubic feet<br></form><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->