Advertisement
Guest User

Untitled

a guest
May 30th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. 2. Attach a load event listener to the window that logs to the console the number of elements
  2. a. The element with the id para
  3. b. All paragraph <p> elements
  4. c. All elements with the class "highlight"
  5. d. All list item <li> elements in the first list
  6. e. All list item <li> elements with the class "highlight"
  7. f. All list item <li> elements and all paragraph <p> elements with the class "highlight"
  8.  
  9.  
  10.  
  11. window.onload = function() {
  12. console.log(document.getElementById("para"));
  13. }
  14.  
  15. window.onload = function() {
  16. console.log(document.getElementsByTagName("p"));
  17. }
  18. window.onload = function() {
  19. console.log(document.querySelectorAll(".highlight"));
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement