Javascript Reference
Categories: Element

javascript Element insertAdjacentHTML( )

@March 15, 2008, 1:22 a.m.
insertAdjacentHTML( ) NN n/a IE 4 DOM n/a  

insertAdjacentHTML("where", HTMLText)

  

Inserts a text string into the designated position relative to the element's existing HTML. If HTML tags are part of the text to be inserted, the browser interprets the tags and performs the desired rendering. This method is not supported in many objects in the Macintosh version of IE 4.

 
Parameters
 
  • String value of one of the following constants: BeforeBegin | AfterBegin | BeforeEnd | AfterEnd. The first and last locations are outside the HTML tags of the current element; the middle two locations are between the tags and element content.
  • String value of the text and/or HTML to be inserted in the desired location.
 
Returned Value

None.


Powered by Linode.