Advertisement
svetoslavhl

HTML

May 8th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Proba</title>
  5.  
  6. </head>
  7. <body>
  8.  
  9. <h1>My First JavaScript</h1>
  10.  
  11. <p id = "example" style = "color:red;">Hello World</p>
  12.  
  13.  
  14.  
  15.  
  16. <button type="button" onclick="myFunction()">Date</button>
  17.  
  18. <script>
  19. function myFunction() {
  20.  
  21. alert(document.getElementById("example").style.color);
  22.  
  23. }
  24.  
  25.  
  26. </script>
  27.  
  28.  
  29.  
  30.  
  31.  
  32. </body>
  33. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement