79204885

Date: 2024-11-19 20:04:04
Score: 1
Natty:
Report link

Most of the answers here work well, but I don't see anyone mentioning that you can accomplish this very simply without needing to define extra JS elsewhere.

Essentially, the accepted answer can be condensed into just this:

<input value="Click me to select!" onfocus="this.select()" />

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Arthur Judd