2080 5

CSC329 ยท 2080 ยท 5 marks

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]

Web TechnologyChapter 4: Client Side Scripting with JavaScriptBuilt-in Objects

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...