A

Admin • 828.03K Points
Coach

Q. How to pick a document element based on the value of its id attribute?

  • (A) getElementsbyId()
  • (B) getElementbyId()
  • (C) both getElementsbyId() and getElementbyId()
  • (D) none of the mentioned
  • Correct Answer - Option(B)
  • Views: 4
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin
The Document object has important methods such as getElementById(), which returns a single document element (representing an open/close pair of HTML tags and all of the content between them) based on the value of its id attribute.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.