Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <body>
  3.  
  4. <p>Click the button to display the square root of 16.</p>
  5.  
  6. <button onclick="myFunction()">Try it</button>
  7.  
  8. <p id="demo"></p>
  9.  
  10. <script>
  11. function myFunction() {
  12.     document.getElementById("demo").innerHTML = Math.sqrt(16);
  13. }
  14. </script>
  15.  
  16. </body>
  17. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement