Web Technology20805 marksBuilt-in Objects
How HTML elements are accessed using getElementById and getElementByTagName, illustrate using HTML script.
How HTML elements are accessed using getElementById and getElementByTagName, illustrate using HTML script. [5]
JavaScript provides built-in DOM (Document Object Model) methods to access and manipulate HTML elements: Method Description ------ getElementById("id") Accesses a single element by its unique id attribute getElementsByTagName("tag") Accesses a collection of elements by their HTML tag name --- - S...