MCQ Answer

Which method is used to access an element by its id in JavaScript

Which method is used to access an element by its id in JavaScript

जावास्क्रिप्ट में किसी तत्व को उसकी आईडी द्वारा एक्सेस करने के लिए किस विधि का उपयोग किया जाता है
Topic : JS Introduction

A. document.getElementById()

B. document.getElementByClass()

C. document.querySelector()

D. document.getElementByName()




Correct Answer is :

A. document.getElementById()



Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad