Input Text select() method
Example
Select the content of a text field:
document.getElementById("myText").select();
Try it »
Definition and Usage
The select() method is used to select the content in a text field.
Browser support

All major browsers support the select() method.
Syntax
textObject
.select()
Parameters
| None. |
|---|
Technical details
| Return value: | No return value |
|---|
The Input Text object