Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title> Heather Maschino </title>
- </head>
- <body>
- <h1>JavaScript Function</h1>
- <p id="myName">My name is:</p>
- <p id="myCamelCase">My name in camelCase is:</p>
- <p id="myCartoonCharacter">My cartoon character is:</p>
- <p>
- <button type="button" onclick="myVitals()">Click</button>
- </p>
- <script>
- function myVitals () {
- document.getElementById ("myName") .innerHTML = "My name is: Heather Maschino.";
- document.getElementById ("myCamelCase") .innerHTML = "My name in camelCase is: Heather Maschino.";
- document.getElementById ("myCartoonCharacter") .innerHTML = "My Cartoon Character is: The Brain from Pinky & The Brain.";
- }
- </script>
- <p id="dateTime"></p>
- <p>
- <button type="button" onclick="document.getElementById ('dateTime') .innerHTML = Date ()"> Click me to display Date and Time.</button>
- </p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement