Keywords: internal insertion End
$ (target Element). Append (content) in .... Inside the end of the insert content
HTML: <p> This is the target element </p>
jquery: $ ("P"). Append (", this is the Append Insert section")
Then the result of the execution is:
Html:<p> This is the target element, this is the Append Insert Section </p>
$ (content). AppendTo (target Element) insert content into .... The end of the interior
jquery: $ ("This is the AppendTo Insert section"). AppendTo ("P")
Results:
Html:<p> This is the target element, this is the Appendto insert Section </p>
Keywords: internal insert the first end
$ (target Element). prepend (content) in .... Internal insert content on the first end
HTML: <p> This is the target element </p>
jquery: $ ("P"). Prepend ("This is what prepend inserts,")
Then the result of the execution is:
HTML: <p> This is what prepend inserts, which is the target element </p>
$ (content). Prependto (target Element) insert content into ... The first end of the interior
jquery: $ ("This is what prependto inserts,"). AppendTo ("P")
Then the result of the execution is:
HTML: <p> This is what prependto inserts, which is the target element </p>
Append () and Appendto (), prepend () and prependto () differences