×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

Which JavaScript method is used to access an HTML element by id?

9. Which JavaScript method is used to access an HTML element by id?

  1. getElementById()
  2. getElement(id)
  3. getElementById(id)
  4. elementById(id)

Answer: C) getElementById(id)

Explanation:

The JavaScript method document.getElementById(id) is used to access an HTML document by id.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.