Created
July 16, 2020 17:58
-
-
Save technomaz/7c8cafe9c080bbe7a13aaec882d26f4e to your computer and use it in GitHub Desktop.
DOM Get Element functions
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
// Get single element by ID | |
var el=document.getElementById('test'); | |
// Get single element by class name | |
var el=document.getElementsByClassName('test')[0]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment