Input Text select()Method

Input Text 对象参考手册Input Text Object

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

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers support the select() method.


Syntax

textObject.select()

Parameters

None.

Technical Details

Return Value: No return value


Input Text 对象参考手册Input Text Object Other Extensions