1. Append (content) method
Method function: appends content to each matching element.
Parameter description: Content (<Content>): What to append to the target.
Usage examples:
HTML code for <p>i come from </p><p>i love </p>
Append a word to all P tags in China, the notation is $ ("P"). Append ("China");
Result: <p>i come from China</p><p>i love </p>
2. AppendTo (expr) method
Method: appends all matching elements to the specified set of element elements.
Parameter description: Expr (String): A jquery expression used to match elements.
Usage examples:
HTML code for <b>i love </b><p></p>
Append the label B to the P element, and the notation is $ ("B"). AppendTo ("P");
The result: ><p><b>i love </b></p>
Using Appendto This method reverses the regular $ (A). Append (b) operation, that is, instead of appending B to a, append a to B.
The difference between append and Appendto methods in jquery