Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <script type="text/javascript">
- function calcGeometry(radius) {
- var circumference = Math.PI * 2*radius;
- console.log("The circumference is " + circumference);
- var area = Math.PI * radius*radius;
- console.log("The area is " + area);
- }
- </script>
- <form name=form1>
- Enter the radius of circle:
- <input type="text" name="txtRadius" size=10>
- <br>
- <input type="button" value="Calculate" onClick='calcGeometry();'>
- </form>
- </body>
- </html>
Add Comment
Please, Sign In to add comment