Input Text select()Method
Example
Select the content of the text field:
document.getElementById("myText").select();
Try it Yourself »
Definition and Usage
The select() method is used to select the content of a text field.
Browser Support
![]()
All major browsers support the select() method.
Syntax
textObject.select()
Parameters
| None. |
Technical Details
| Return Value: | No return value |
|---|
Input Text Object Other Extensions