开发者

How can I keep a text selection inside the text area?

开发者 https://www.devze.com 2023-01-25 15:13 出处:网络
I want to keep the text selection when the textarea loses the focus. For Internet开发者_开发技巧 Explorer and without any jQuery.If the selection needs to be visible only when the textarea has the foc

I want to keep the text selection when the textarea loses the focus.

For Internet开发者_开发技巧 Explorer and without any jQuery.


If the selection needs to be visible only when the textarea has the focus, you could store the selected start and end, at onblur and at the next onfocus set it again.

0

精彩评论

暂无评论...
验证码 换一张
取 消