0
How to select class, id and value
When i click on a button, the target element and its parent and parent of parent should be displayed on console with id, class and value.
2 odpowiedzi
0
Vanilla Javascript solution
https://code.sololearn.com/WK2ilTc7JaKt/?ref=app
If that's not what you want please tell more
0
With a dot notation
a.id //returns a id value
a.class // returns a class value
a.id = "identity" //sets a id to identity
a.class = "classic" //sets a class to classic