1.

How do we get the DOM object in JavaScript?(a) getElementbyId()(b) getObject()(c) getElement()(d) getNodeobject()The question was posed to me in an online quiz.The above asked question is from Animation topic in division Caching, Debugging and Animation of JavaScript

Answer»

The correct answer is (a) getElementbyId()

To explain I would say: The getElementbyId() is used to get the DOM object in JavaScript by simply CALLING that function associated with the HTML DOCUMENT. The object in this method GETS referenced by the ID name.



Discussion

No Comment Found

Related InterviewSolutions