Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Proba</title>
- </head>
- <body>
- <h1>My First JavaScript</h1>
- <p id = "example" style = "color:red;">Hello World</p>
- <button type="button" onclick="myFunction()">Date</button>
- <script>
- function myFunction() {
- alert(document.getElementById("example").style.color);
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement