Advertisement
Felanpro

Borrow this code? (Includes Javascript ofc)

Sep 26th, 2015
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.93 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.  
  4. <head>
  5. <title>Javascript</title>
  6.  
  7. <script>
  8. function myFunction() {
  9. document.getElementById("paragraph").innerHTML = "You changed the paragraph Felix!";
  10. }
  11. </script>
  12.  
  13.  
  14. <script>
  15. function myFunction2() {
  16. document.getElementById("paragraph2").innerHTML = "You changed the paragraph Felix!";
  17. }
  18. </script>
  19.  
  20. <style>
  21. #h1css {
  22. color: #FF0000;
  23. }
  24. </style>
  25.  
  26. <script>
  27. function myFunction3() {
  28. document.getElementById("paragraph3").innerHTML = "The text has appeared!"
  29. }
  30. </script>
  31.  
  32. <script>
  33. function myFunction4() {
  34. document.getElementById("paragraph4").style.color = "red";
  35. }
  36. </script>
  37.  
  38.  
  39. </head>
  40.  
  41.  
  42. <body>
  43.  
  44. <h1 id="h1css">Javascript</h1>
  45. <hr>
  46. <h1>Example 1</h1>
  47. <p id="paragraph">Change this paragraph Felix!</p>
  48.  
  49. <button type="button" onclick="myFunction()">Click me!</button>
  50. <hr>
  51. <h1>Example 2</h1>
  52. <p id="paragraph2">Change this paragraph Felix!</p>
  53.  
  54. <button type="button"
  55. onclick="myFunction2()">Click me!</button>                      
  56. <hr>
  57. <h1>Example 3</h1>
  58. <p id="paragraph6">Change this paragraph Felix!</p>
  59.  
  60. <button onclick="myFunction5()">Click me!</button>
  61.  
  62.  
  63. <hr>
  64. <h1>Other things</h1>
  65. <p>After you've clicked the button it should appear another paragraph right underneath it.</p>
  66.  
  67. <button type="button" onclick="myFunction3()">Click me!</button>
  68.  
  69. <p id="paragraph3"></p>                                            
  70. <hr>
  71. <h1>Other things 2</h1>
  72. <p id="paragraph4">After clicking the button this text should be red.</p>
  73.  
  74. <button type="button" onclick="myFunction4()">Click me!</button>
  75. <hr>
  76.  
  77. <script src="javascript.js"></script>
  78.  
  79. <h1>Very usefull</h1>
  80. <p>Cool thing after you've clicked.</p>
  81.  
  82. <button type="button" onclick="document.write(11)">Click me!</button>
  83. <hr>
  84.  
  85. <p id="weed123"></p>
  86.  
  87. <script>
  88. var weed = 100;
  89. var smoke = 100;
  90. var together = weed + " hola como estas?";
  91. document.getElementById("weed123").innerHTML = together;
  92. </script>
  93.  
  94. </body>
  95.  
  96. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement