Name

move( ) — NN n/a IE 4 DOM n/a

Synopsis

move(unit[, count])

Collapses the current text range to an insertion point at the end of the current range and moves it forward or backward from the current position by one or more units.

Returned Value

Integer of the number of units moved.

Parameters

unit

A case-insensitive string value of the desired unit: character | word | sentence | textedit. The textedit value moves the insertion pointer to the start or end of the entire original range.

count

An optional integer of the number of units to move the insertion pointer. Positive values move the pointer forward; negative values move the pointer backward. Default value is 1.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.