Home >Web Front-end >JS Tutorial >JQuery adds and removes DOM sample code in the page_jquery
1.before(): Add the new node to the front
2.after(): Add the node to the lower part
3.prepend(): Turn the node into the first node
4.append(): Add a new node to the end, the effect is the same as appendTo(), but there is a difference in syntax
5.remove(): Remove the node
Example: