textarea.selectionStart in IE

后端 未结 1 766
清歌不尽
清歌不尽 2020-12-11 10:10

With this code I can check the caret position in a textarea in firefox:

document.getElementById(\"myTextArea\").selectionStart

This doesn\'

1条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-11 10:46

    See 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

    0 讨论(0)
提交回复
热议问题