Search e01
One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.
6 results across 6 corpora for HTMLInputElement: setSelectionRange() method.
Dictionary 0
This corpus is unavailable: timeout
Papers 0
This corpus is unavailable: timeout
Wikidata 0
This corpus is unavailable: timeout
Developer library 6
` ` HTML input element
range of characters in the input element to a given string. A `selectMode` parameter is available to allow controlling how the existing content is affected. - setSelectionRange() - : Selects the specified range of characters within a textual input element. Does nothing for inputs which aren't presented as text input fields. - showPicker() - : Displays the browser picker for the input element that would normally
Document: getSelection() method
tical to `window.document.getSelection()`. Currently, `getSelection()` doesn't work on the content of textarea and input elements in Firefox. HTMLInputElement.setSelectionRange() or the `selectionStart` and `selectionEnd` properties could be used to work around this. Notice also the difference between _selection_ and _focus_. Document.activeElement returns the focused element. ## Examples ### Getting a Selection
HTMLInputElement
ement is suffering from a custom validity error, and does not validate. - setRangeText() - : Replaces a range of text in the input element with new text. - setSelectionRange() - : Selects a range of text in the input element (but does not focus it). - showPicker() - : Shows a browser picker for date, time, color, and files. - stepDown() - : Decrements the [`value`](/docs/Web/HTML/Reference/Elements/input#
HTMLInputElement: setSelectionRange() method
HTML DOM The **`setSelectionRange()`** method of the HTMLInputElement interface sets the start and end positions of the current text selection in an input element. This updates the selection state immediately, though the visual highlight only appears when the element is focused. This method updates the HTMLInputElement.selectionStart, HTMLInputElement.selectionEnd, and HTMLInputElement.selectionDirection properties
HTMLInputElement: select() method
ntListener("click", selectText); ``` ### Result Examples ## Specifications ## Browser compatibility ## See also - HTMLInputElement - HTMLInputElement.setSelectionRange()
HTMLInputElement: selectionDirection property
also - HTMLTextAreaElement.selectionDirection property - HTMLInputElement.selectionStart property - HTMLInputElement.selectionEnd property - HTMLInputElement.setSelectionRange method