Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1- the content of the <h1> element is changed when a user clicks on it:
- <!DOCTYPE html>
- <html>
- <body>
- <h1 onclick="this.innerHTML='Ooops!'">Click on this text!</h1>
- </body>
- </html>
- 2-clic for the time display
- <!DOCTYPE html>
- <html>
- <body>
- <p>Click the button to display the date.</p>
- <button onclick="displayDate()">The time is?</button>
- <script>
- function displayDate() {
- document.getElementById("demo").innerHTML = Date();
- }
- </script>
- <p id="demo"></p>
- </body>
- </html>
- for download it completly:http://gsul.me/aO5t
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement