1.

Which is a possible way of finding all the img elements in the document?(a) document(images)(b) document.images[](c) document(img)(d) doc(img)This question was posed to me in examination.I want to ask this question from Scripted Media in section Graphics and Rendering of JavaScript

Answer»

The correct ANSWER is (b) document.images[]

For explanation: The BEST suited option is document.image[] to FIND all img ELEMENTS in the document.[index] is used to specify the index of which img tag is to be selected.



Discussion

No Comment Found

Related InterviewSolutions