Turn, insertadjacentelement Method

Source: Internet
Author: User

Syntax:
Oelement = object.Insertadjacentelement(Swhere, oelement)
Parameters:
Oelement: required. Object (element ). The object to insert to the adjacent object.

Swhere: required. String ). Beforebegin | afterbegin | beforeend | afterend beforebegin: inserts an oelement before the start tag of the object.
Afterbegin: inserts an oelement after the start tag of the object. But before all the original content of the object.
Beforeend: insert the oelement before the end tag of the object. But after all the original content of the object.
Afterend: insert the oelement to the end tag of the object.

Return Value:
Oelement: Object (element ). Returns the reference of the inserted object.

Note:
Insert the oelement into the document structure based on the object positioning.
You cannot try this method when the document is being loaded. It must be after the onload event is triggered.
If you try to insert an object that has already been located in the document structure, the object will be moved to the position you specified, and no new object will be created.



  • list project 1
  • list project 2






button B beforebegin afterbegin beforeend afterend

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.