aspxtreme

insertAdjacentText Method

DHTML Methods


Inserts the given text into the element at the given location. The text is inserted as plain text.

Syntax


object.insertAdjacentText ( sWhere, sText ) 
Parameters

sWhere Required. Location to insert the text. This can be one of the following:

beforeBegin Inserts the text immediately before the element.
afterBegin Inserts the text after the start of the element but before all other content in the element.
beforeEnd Inserts the text immediately before the end of the element but after all other content in the element.
afterEnd Inserts the text immediately after the end of the element.

sText Required. Text to insert.

Return Value

No return value.

Remarks

You cannot insert text while the document is loading. Wait for the onload event before attempting to call this method.

See Also

innerText, insertAdjacentHTML, outerText



Books and more ...

Contents
HTML Elements / DOM Objects
HTML Element Attributes
CSS Attributes
DOM Object Properties
DOM-compliant Events Reference
DOM Methods Reference
DOM Collections Reference
 


Suggested Reading



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support aspxtreme