views:

4614

answers:

1

Does anybody know how to move the cursor in a textbox to a particular position?

For example if a textbox (e.g. input element, not textarea) has 50 characters in it and I want to position the cursor before character 20, how woould i go about it?

Jon

+4  A: 

Setting Cursor Position in a Textbox or TextArea with Javascript by Josh Stodola

RandomNoob