Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- #button1 {
- height: 50px;
- width: 76px;
- background-color: blue;
- color: yellow;
- border: 3px solid green;
- }
- </style>
- </head>
- <body>
- <h1 id="demo">This Text Is Going To Change After Someone Click The Lonely Button!</h1>
- <button type ="button" id="button1" onclick="randomFunction()">Click me!</button>
- <script>
- function randomFunction()
- {
- document.getElementById("demo").innerHTML = "THANK YOU, YOU CHANGED ME!";
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement