ZVON > References > DOM2 Reference

select (method )

Owning interface and usage:  
HTMLInputElement.select()

Member of these other interfaces:  
none

Description:  
Select the contents of the text area. For INPUT elements whose type attribute has one of the following values: "text", "file", or "password".

Parameters:  
none

Returns:  
nothing

Exceptions:  
none


Example:
Source:
   <INPUT id="textInput" type="text" value="text-to-select"></INPUT>
JavaScript:
  function selectInput() {
    var main = document.getElementById('textInput');
    main.select();
  }
Try it:  
See it: