Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Something</title>
- </head>
- <body>
- <button onclick="increment()">Click Me!</button>
- <p id = "lal">2</p>
- <script src = "popup.js"></script>
- </body>
- </html>
- var num = 1;
- function increment(){
- document.getElementById("lal").innerHTML = num * 2;
- num = num * 2;
- }
Add Comment
Please, Sign In to add comment