This is quite similar to an expression that assigns a new value to the innerText property of an Element object. In this case, the new text leaves the existing text and HTML content intact.
The relative positions where the adjacent text can be introduced determine where the new text is to be inserted. The following relative positions can be specified:
You cannot call this method while the document is loading.
MSIE version 4 for Macintosh does not support this as widely as the Windows version or later versions of MSIE for Macintosh.
Prev | Home | Next |
Element.insertAdjacentHTML() | Up | Element.isContentEditable |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |