A Pen by Fahad Murtaza on CodePen.
Created
July 31, 2022 14:56
-
-
Save fahdi/7040bffb17c803d7a97d1948897e64cd to your computer and use it in GitHub Desktop.
Change Me on Click
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<div id="message">I love you!</div> | |
<button type="button" onclick="myResponse()">Respond</button> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myResponse() { | |
document.getElementById("message").innerHTML = "It's not you, it's me!"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#message { | |
padding: 20px 0 20px 0; | |
font-size: 200%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment