A

Admin • 833K Points
Coach

Q. Which DOM method selects an element by its ID?

  • (A) document.getElementById()
  • (B) document.querySelectorAll()
  • (C) document.getElementByClass()
  • (D) document.findById()
  • Correct Answer - Option(A)
  • Views: 20
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

getElementById returns a reference to the element with specified ID.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.