Tag: querySelector() querySelectorAll
-

Selecting Elements in DOM
getElementById() – select an element by id. getElementsByName() – select elements by name. getElementsByTagName() – select elements by a tag name. getElementsByClassName() – select elements by one or more class names. querySelector() and querySelectorAll – select elements by CSS selectors. Note that the getElementById() and querySelector() returns an object with the Element type while getElementsByTagName()…