1. Append elements inside/outside the element append, prepend: added to child elements
before, after: added as sibling elements
html:
Javascript:
Add elements inside #content. This is to add
Yao Ming retired...
as a child element to #content. If you want to append elements outside the element, you need to use after. In this case You can append
Yao Ming retired...
as a brother element after #content
2. Append content at different positions of the element html
The bright moonlight in front of the window
div> >
The code is as follows:
3. At the beginning of the element Position append content
html
Copy code
The code is as follows:
< div>
Copy code
The code is as follows:
4. Append content at the beginning of different elements
In my Add a piece of news after
Add elements inside #content. This is to add
suspected to be frost on the ground as a sub-element to the beginning of #content. If you want to add a start element outside the element, you need to use before. In this case, you can add
suspected to be frost on the ground as a sibling element to #content and start
5. Contain with elements of specified structure Element Warp(html)
specifies the html element in the specified html, but the specified element cannot contain sibling elements, otherwise it will not run normally and does not contain general text strings. The following code Use div tags to include p tags
html
< form id="form1" runat="server">
include me in div
javascript
6. Contain multiple html elements with specified elements warpAll(html)
html
javascript
7. Use the specified tag to include sub-elements wrapInner(html)
Same as the warp method, specify the html element in html, for example:
Use the b tag to include the text in the p tag The code is as follows:
html code
Enclose the text of the p tag with the b tag
Also include the text of the p tag with the b tag< /p>