Created
November 30, 2020 09:28
-
-
Save wpflames/48b1aca000de45c835e99ef1a984b97f to your computer and use it in GitHub Desktop.
JavaScript addEventListener click
This file contains hidden or 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
| var btn = document.getElementById('button'); | |
| btn.addEventListener('click', loadText); | |
| function loadText(){ | |
| console.log('button clicked'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment