[Javascript] Get the position of the cursor in a textarea?

David Yee dyee at AMSResponse.com
Tue Jan 29 18:37:20 CST 2002


Hi all.  Is it possible to get the position of the cursor in a textarea?
E.g. let's say I have:

Hello there, Welcome to 12345 company.

in a textarea, and the cursor is currently after the word Hello.  So I would
like a value of 6 returned by such a javascript function.  Thanks!

David



More information about the Javascript mailing list