Get:
1.document.getelementbyid ()
Get nodes by ID
2.document.getelementsbyclassname ()
Get a node set (array) by class name
3.document.getelementsbytagname ()
Get a node set (array) by tag name
4.document.createelement ()
Create a new node
5.document.queryselector ()
Get nodes by CSS Selector
6.document.queryselectorall ()
Get node Set (array) by CSS Selector
Edit:
after you get the element node, you can edit the Properties of the operation element node (ID, SRC, className, style, OffsetTop, Offsetwidth, ClientWidth, scrollwidth .... ) and content (InnerHTML, outerhtml, InnerText, Textcontent, ChildNodes, AppendChild, removechild .... ).
It is important to note how the style of Operation is written:
1. The first type is node.style. Style name : For example div.style.height= "100px"( More special: have-style names such as Div.style.backgroundColor, floating div.style.cssFloat)
2. The second type is node.style.cssText : For example, div.style.csstext= "display:block;width:100px;height:100px"
JS get node and edit method