Qus : Which JavaScript method is used to access an HTML element by id?
QusID के ज़रिए HTML एलिमेंट को एक्सेस करने के लिए किस JavaScript मेथड का इस्तेमाल किया जाता है?
A. getElement(id) B. getElementById(id)
C. getElementById() D. elementById(id)
Solution
B. getElementById(id)
Explanation
In JavaScript, the method document.getElementById(id) is used to access an HTML element using its id