如何在<textarea>使用JavaScript中获得插入位置?
<textarea>
例如: This is| a text
This is| a text
这应该回来了7.
7
如何让它返回光标/选择周围的字符串?
例如:'This is', '', ' a text'.
'This is', '', ' a text'
如果突出显示"是"一词,那么它将返回'This ', 'is', ' a text'.
'This ', 'is', ' a text'
javascript textarea cursor caret
caret ×1
cursor ×1
javascript ×1
textarea ×1