JavaScript » Text » select

Syntax:
object.select( )

This method is used to select and highlight the entire text that is currently in the input field. When the user starts typing, they will replace whatever is currently there. Used in conjunction with the focus method, this makes it easy to prompt the user for input and places the cursor in the correct place.