If you want to make changes to the website or an app after it is loaded you need to do so by changing the elements inside the DOM.
document.getElementsByName() is not used that often but it is available. Basically what it does is that it selects all the element in DOM which is assigned a name property and you specify that name property inside those parenthesis.
document.getElementsByTagName() is used to select elements by tag name, for example you can get a list of all the div’s on your HTML page using this selector.
document.getElementsByClassName() is same as
.getElementsByTagName() but this time we target elements using class. You specify the class name in parenthesis and it will get all those elements which have that class property assigned to them.
document.querySelector() allows you to target a specific ID, Class, or a Tag Name. The difference in .querySelectorAll() and .querySelector() is that .querySelectorAll() target all the elements in HTML which matches the ID, Class, or a Tag Name that you have specified in parenthesis. While .querySelector() only targets the first element that matches the ID, Class, or a Tag Name.
document.getElementById() perhaps on of the most used command from all the selectors targets a specific ID which you have mentioned in the parenthesis.