glz
12-23-2007, 10:39 PM
How can I place the text cursor in a certain position among text in a <input type="text" /> form field?
for example let's say the input field contains this value:
hello
I want to place the blinking cursor before the 'h'
I want to place the linking cursor after the 'o'
How JS code do I need to do this?
I tried focus() but this just places the focus on the form field, and does not change cursor position.
Thanks
for example let's say the input field contains this value:
hello
I want to place the blinking cursor before the 'h'
I want to place the linking cursor after the 'o'
How JS code do I need to do this?
I tried focus() but this just places the focus on the form field, and does not change cursor position.
Thanks