DatBoi101

Basic JavaScript Code

Jul 9th, 2020
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.34 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.   <head>
  4.     <title>Hello World!</title>
  5.   </head>
  6.   <body>
  7.     <button
  8.      type="button"
  9.      onclick='document.getElementById("text").innerHTML = "John Doe"'
  10.    >
  11.       Click Me!
  12.     </button>
  13.     <h1>You Can Change Text With JavaScript!</h1>
  14.     <p id="text">Hello and i'm...</p>
  15.   </body>
  16. </html>
Add Comment
Please, Sign In to add comment