This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get or set the caret position in text (JavaScript)

 
Kevin Tysen
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In an input (text) or text area, is there a way to get or set the position of the caret? (I've always called it a cursor, but java API calls it a caret. Maybe 'cursor' sounds like something evil.) In java there are methods for it, but I can't seem to find anything in JavaScript.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic