javascript select all text in input on click code example
Example 1: how to select all text when input box is clicked
<input type="text" onClick="this.select();" value="Sample Text"/>
Example 2: select all text of input onclick
<input type="text" onfocus="this.select();" onmouseup="return false;" value="test" />