js click textbox select all test code example
Example: select all text of input onclick
<input type="text" onfocus="this.select();" onmouseup="return false;" value="test" />
<input type="text" onfocus="this.select();" onmouseup="return false;" value="test" />