Guest User

Untitled

a guest
Nov 16th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Something</title>
  5. </head>
  6. <body>
  7. <button onclick="increment()">Click Me!</button>
  8. <p id = "lal">2</p>
  9. <script src = "popup.js"></script>
  10. </body>
  11. </html>
  12.  
  13. var num = 1;
  14. function increment(){
  15. document.getElementById("lal").innerHTML = num * 2;
  16. num = num * 2;
  17. }
Add Comment
Please, Sign In to add comment