Quantcast
Channel: put cursor at end of text input's value - Stack Overflow
Viewing all articles
Browse latest Browse all 7

put cursor at end of text input's value

$
0
0

So, currently I have a text-input-field with a value that is also autofocused.

On page load, the value is selected / highlighted. Is there a way I can put the cursor at the end of the value text instead of highlighting it in javascript or CSS?

Here is a js fiddle where the autofocused text's value is highlighted: http://jsfiddle.net/TaGL5/

Here is the HTML code: <input type="text" value="value text" autofocus />


Viewing all articles
Browse latest Browse all 7

Latest Images

Trending Articles





Latest Images