Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <h1 onclick="changeText(this)">Click on this text!</h1>
- <!-- what does the "this" ^ here do? -->
- <script>
- function changeText(id) {
- id.innerHTML = "Ooops!";
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement