πŸ“Š JavaScript
Q. Which DOM method selects an element by its ID?
  • (A) document.getElementById()
  • (B) document.querySelectorAll()
  • (C) document.getElementByClass()
  • (D) document.findById()
πŸ’¬ Discuss
βœ… Correct Answer: (A) document.getElementById()

Explanation: getElementById returns a reference to the element with specified ID.

Explanation by: Mr. Dubey
getElementById returns a reference to the element with specified ID.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
50
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
90%
Success Rate