What is the getElementById() method?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is the getElementById() method?
Rating:
The getElementById() method belongs to the document object. It is used to access all the elements in the <body> tag by using their id. The id is an attribute of the elements such as anchor, layer, etc., in the <body> tag.
The syntax of using the getElementById() method is as follows:
Rating:
Was this information helpful?
Other articles
- What is the window object?
- What is a property?
- What is the search() method?
- What is the title property?
- How to use the fgColor property?