Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Javascript testing</title>
- </head>
- <body>
- <p id="demo">This paragraph will change after clicking that button below!</p>
- <button type="button" onclick="randomFunction()">Click!</button>
- <script>
- function randomFunction() {
- document.getElementById("demo").innerHTML = "Paragraph changed!";
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement