1, Console.log () is the bar element displayed in the console
2, AppendChild () is to append the element to the end
3. innerHTML gets all the content inside the element including the child elements inside it.
4. innertext gets the text inside the element, excluding child elements
5, GetElement is to get existing elements
6, CreateElement is created element, does not exist, dynamically created
7, ParentNode parent node,
8, removechild () Delete child nodes
9, Getattribue () Gets the property, variable. getattribute (attribute)
10, SetAttribute () set properties, SetAttribute ("Property name", "Property value")
Explanation:
The ① appendchild () method adds the last child node to the node.
Tip: If you need to create a new paragraph that contains text, remember to add the text node to the text of the paragraph, and then add the paragraph to the document.
You can also use the AppendChild () method to move elements from one element to another.
The ② ParentNode property returns the parent node of the specified node as a nodes object.
If the specified node does not have a parent node, NULL is returned.
The ③ getattribute () method returns the property value for the specified property name.
Tip: If you want to return properties as Attr objects, use GetAttributeNode.
The ④ SetAttribute () method adds the specified property and assigns the specified value to it.
If the specified property already exists, only the value is set/changed.
Getting Started with DOM methods-lesson Two