Find HTML elements
Typically, with JavaScript, you need to manipulate HTML elements.
In order to do this, you must first find the element. There are three ways to do this:
- Find HTML element by id
- Find HTML elements by tag name
- Find HTML elements by class name
take a chestnut
Through document, you can find child elements by id, className, etc.
But in addition to document, other child elements can only be found through the following three methods
attached picture