Last active
June 8, 2022 06:32
-
-
Save celestial-labs/1d7e21149b348c8906a66803b60ee179 to your computer and use it in GitHub Desktop.
[js selector] #js #dom #javascript
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
| const elem = document.getElementById( 'exampleDiv' ); |
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
| const elems = document.getElementsByClassName( 'example') | |
| const elem = document.querySelector( 'img.class' ); | |
| const elems = document.querySelectorAll( 'img.class, #id1' ); |
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
| const elems = document.getElementsByTagName( 'div' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment