admin管理员组文章数量:1388868
With this code I can check the caret position in a textarea in firefox:
document.getElementById("myTextArea").selectionStart
This doesn't work in IE 8. How can I get the caret position in IE 8?
With this code I can check the caret position in a textarea in firefox:
document.getElementById("myTextArea").selectionStart
This doesn't work in IE 8. How can I get the caret position in IE 8?
Share Improve this question edited Apr 13, 2010 at 9:28 kayahr asked Apr 13, 2010 at 9:14 kayahrkayahr 22.1k30 gold badges105 silver badges148 bronze badges 1- 1 Possible duplicate: stackoverflow./questions/263743/… – Tim Down Commented Apr 13, 2010 at 9:37
1 Answer
Reset to default 2See the answers here: Caret position in textarea, in characters from the start
Edit
I sorted out the line breaks issue in IE and posted an answer here: Caret position in textarea, in characters from the start
本文标签: javascripttextareaselectionStart in IEStack Overflow
版权声明:本文标题:javascript - textarea.selectionStart in IE - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744627477a2616344.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论