Course Content
Javascript Full Course
0/87
JavaScript Course
About Lesson

The insertAdjacentElement() method inserts the specified element at the specified position. The legal values for this position are.

  • afterbegin
  • afterend
  • beforebegin
  • beforeend
Syntax:

node.insertAdjacentElement(position, element)

The DOM insertAdjacentHTML() method is used to insert a text as HTML file to a specified position. This method is used to change or add text as HTML.

Syntax :

node.insertAdjacentHTML(specify-position, text-to-enter)

Return Value : This will return the page with the specified change. There are four legal position values that can be used.

  • afterbegin
  • afterend
  • beforebegin
  • beforeend
Exercise Files
No Attachment Found
No Attachment Found
Join the conversation

Introducing Official ApeStaking Protocol for ApeCoin.

New Blur NFT Marketplace Courting Professional.