Guest User

Untitled

a guest
May 25th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <html>
  2. <body>
  3. <script type="text/javascript">
  4. function calcGeometry(radius) {
  5. var circumference = Math.PI * 2*radius;
  6. console.log("The circumference is " + circumference);
  7. var area = Math.PI * radius*radius;
  8. console.log("The area is " + area);
  9. }
  10. </script>
  11. <form name=form1>
  12. Enter the radius of circle:
  13. <input type="text" name="txtRadius" size=10>
  14. <br>
  15. <input type="button" value="Calculate" onClick='calcGeometry();'>
  16. </form>
  17. </body>
  18. </html>
Add Comment
Please, Sign In to add comment