BRElement.insertAdjacentHTML Method
SharePoint Designer Developer Reference |
Inserts HTML text into a BR element at the specified location.
Syntax
expression.insertAdjacentHTML(where, html)
expression Required. A variable that represents a BRElement object.
Parameters
Name | Required/Optional | Data Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
where | Required | String | that specifies where to insert the HTML text. Can be one of the following values:
|
||||||||||
html | Required | String | that specifies the HTML text to insert. The string can be a combination of text and HTML tags. This must be valid, well-formed HTML. |
Remarks
The following image illustrates where text or HTML is inserted when you use each of the possible String values for the where parameter.
Use the insertAdjacentText method to insert text without providing the accompanying HTML tags. In addition, you can use the outerHTML and outerText properties to insert HTML and text outside the specified element, and the innerHTML and innerText properties to insert HTML and text inside the specified element. The following image illustrates where each of these properties applies. Note that the innerHTML and outerHTML properties require well-formed HTML.
See Also