<scriptlanguage="javascript"type="text/javascript"> /* Visit http://www.yaldex.com/
for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Modified by: Ronnie T. Moore (JavaScript Source) -->
<!-- Begin function
doArea(num){ switch(num){ case0:return("");break; case1:varlength=prompt("Please
enter the length of your square:",""); length=length*length; return(length);break; case2:varwidth=prompt("Please
enter the width of the base:",""); varheight=prompt("Please
enter the height of the triangle:",""); return(width*height/2);break; case3:varwidth=prompt("Please
enter the width of your rectangle:",""); varheight=prompt("Please
enter the height of your rectangle:",""); return(width*height);break; case4:var
radius =prompt("Please
enter the radius of the circle: ",""); return(Math.PI*Math.pow(radius,2));break; case5:var
radius =prompt("Please
enter the radious of the sphere:",0); return(4*Math.PI*(Math.pow(radius,2)));break; }
} // End --> </script> <center> <formname=calcarea> Find the area of a <selectname="shape"size="1"onChange="this.form.area.value
= doArea(this.selectedIndex);">
<option> ... <optionvalue="square">Square <optionvalue="triangle">Triangle <optionvalue="rectangle">Rectangle <optionvalue="circle">Circle <optionvalue="sphere">Sphere </select> = <inputtype=textname=areasize=15>
</form> </center>