Let's say i have this input:
<li><input type="text" id="elementHeight" class="form-control" placeholder="Height"> </li>
and i want to ''Select All'' in the input field when the user clicks on it.
From a similar question, I got an answer I prefer.
<input type="text" onfocus="this.select();" onmouseup="return false;" />
Source: https://stackoverflow.com/a/480756/989227
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With