Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2. Attach a load event listener to the window that logs to the console the number of elements
- a. The element with the id para
- b. All paragraph <p> elements
- c. All elements with the class "highlight"
- d. All list item <li> elements in the first list
- e. All list item <li> elements with the class "highlight"
- f. All list item <li> elements and all paragraph <p> elements with the class "highlight"
- window.onload = function() {
- console.log(document.getElementById("para"));
- }
- window.onload = function() {
- console.log(document.getElementsByTagName("p"));
- }
- window.onload = function() {
- console.log(document.querySelectorAll(".highlight"));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement