This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure 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
  • 0
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic