Multiple choice technology web technology

How will you get the html object in java script using its ID ?

  1. var obj=document.findControl('controlId');

  2. var obj=document.getObjectById('controlId');

  3. var obj=document.getElementById('controlId');

  4. var obj=document.getObject('controlId');

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The standard DOM method to retrieve an HTML element by its ID attribute is document.getElementById(). This returns the element object if found, or null if no element with that ID exists. Options A, B, and D reference non-standard methods that don't exist in the DOM API.