Replaces the text adjacent to the element.
Syntax
object.replaceAdjacentText(where, newText)Parameters
- where [in]
-
Type: String
A String that specifies where to locate the replacement text, using one of the following values.
beforeBegin
-
Replaces text immediately before the element.
afterBegin
-
Replaces text after the start of the element, but before all other content in the element.
beforeEnd
-
Replaces text immediately before the end of the element, but after all other content in the element.
afterEnd
-
Replaces text immediately after the end of the element.
- newText [in]
-
Type: String
A String that specifies the replacement text.
Return value
Type: String
A pointer to a String returning the old text.
Standards information
There are no standards that apply here.
See also
- a
- abbr
- address
- area
- article
- aside
- b
- base
- blockQuote
- body
- br
- button
- caption
- cite
- code
- col
- colGroup
- comment
- custom
- dd
- del
- div
- dl
- dt
- em
- embed
- fieldSet
- figcaption
- figure
- footer
- form
- head
- header
- hgroup
- hn
- hr
- html
- i
- iframe
- img
- input type=button
- input type=checkbox
- input type=file
- input type=hidden
- input type=image
- input type=password
- input type=radio
- input type=reset
- input type=submit
- input type=text
- ins
- kbd
- label
- legend
- li
- link
- map
- mark
- nav
- object
- ol
- option
- p
- pre
- q
- rt
- ruby
- s
- samp
- script
- section
- select
- small
- span
- strong
- style
- sub
- sup
- table
- tBody
- td
- textArea
- tFoot
- th
- tHead
- title
- tr
- u
- ul
- var
- Reference
- applyElement
- getAdjacentText
- insertAdjacentElement
Build date: 11/28/2012