Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.92 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title> Heather Maschino </title>
  5. </head>
  6.  
  7. <body>
  8.  
  9. <h1>JavaScript Function</h1>
  10.    
  11.     <p id="myName">My name is:</p>
  12.     <p id="myCamelCase">My name in camelCase is:</p>
  13.     <p id="myCartoonCharacter">My cartoon character is:</p>
  14.    
  15. <p>
  16.     <button type="button" onclick="myVitals()">Click</button>
  17. </p>    
  18.        
  19. <script>
  20. function myVitals () {
  21.     document.getElementById ("myName") .innerHTML = "My name is: Heather Maschino.";
  22.     document.getElementById ("myCamelCase") .innerHTML = "My name in camelCase is: Heather Maschino.";
  23.     document.getElementById ("myCartoonCharacter") .innerHTML = "My Cartoon Character is: The Brain from Pinky & The Brain.";
  24.  
  25. }
  26. </script>
  27.    
  28. <p id="dateTime"></p>
  29.    
  30. <p>
  31.     <button type="button" onclick="document.getElementById ('dateTime') .innerHTML = Date ()"> Click me to display Date and Time.</button>
  32. </p>
  33.     </body>  
  34. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement