Previous Example-|-Next Example-|-Return to Chapter Listing

Example 11.4:
Math Methods--Using PI and sqrt


Enter the radius of a circle:



We created this form: <FORM> Enter the radius of a circle: <INPUT TYPE="text" NAME="num1"><P> <INPUT TYPE="button" VALUE="Find the circumference" onclick="form.result.value = 2*Math.PI*form.num1.value"> <INPUT TYPE="text" NAME="result"><P> <INPUT TYPE="button" VALUE="Find the square root of the first number" onclick="form.result2.value = Math.sqrt(form.num1.value)"> <INPUT TYPE="text" NAME="result2"> </FORM>
Previous Example-|-Next Example-|-Return to Chapter Listing