Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Javascript</title>
- <script>
- function myFunction() {
- document.getElementById("paragraph").innerHTML = "You changed the paragraph Felix!";
- }
- </script>
- <script>
- function myFunction2() {
- document.getElementById("paragraph2").innerHTML = "You changed the paragraph Felix!";
- }
- </script>
- <style>
- #h1css {
- color: #FF0000;
- }
- </style>
- <script>
- function myFunction3() {
- document.getElementById("paragraph3").innerHTML = "The text has appeared!"
- }
- </script>
- <script>
- function myFunction4() {
- document.getElementById("paragraph4").style.color = "red";
- }
- </script>
- </head>
- <body>
- <h1 id="h1css">Javascript</h1>
- <hr>
- <h1>Example 1</h1>
- <p id="paragraph">Change this paragraph Felix!</p>
- <button type="button" onclick="myFunction()">Click me!</button>
- <hr>
- <h1>Example 2</h1>
- <p id="paragraph2">Change this paragraph Felix!</p>
- <button type="button"
- onclick="myFunction2()">Click me!</button>
- <hr>
- <h1>Example 3</h1>
- <p id="paragraph6">Change this paragraph Felix!</p>
- <button onclick="myFunction5()">Click me!</button>
- <hr>
- <h1>Other things</h1>
- <p>After you've clicked the button it should appear another paragraph right underneath it.</p>
- <button type="button" onclick="myFunction3()">Click me!</button>
- <p id="paragraph3"></p>
- <hr>
- <h1>Other things 2</h1>
- <p id="paragraph4">After clicking the button this text should be red.</p>
- <button type="button" onclick="myFunction4()">Click me!</button>
- <hr>
- <script src="javascript.js"></script>
- <h1>Very usefull</h1>
- <p>Cool thing after you've clicked.</p>
- <button type="button" onclick="document.write(11)">Click me!</button>
- <hr>
- <p id="weed123"></p>
- <script>
- var weed = 100;
- var smoke = 100;
- var together = weed + " hola como estas?";
- document.getElementById("weed123").innerHTML = together;
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement