Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- </head>
- <body>
- <p>Change the world</p>
- <button onclick="tan()">Click me!</button>
- </body>
- <script>
- function tan(){
- document.getElementsByTagName("p")[0].innerText = "hello"; //because get ElementsByTagName will return an array!
- }
- </script>
- </html>
Add Comment
Please, Sign In to add comment