textRange selection MSIE

风格不统一 提交于 2019-12-12 16:20:18

问题


I can easily set the selection on 2+ elements programatically in Firefox, But have had no success with IE so I hope anyone here can help me with this.


回答1:


IE doesn't support multiple concurrent selected TextRanges, whether programmatically or manually selected. You can have a ControlRange of multiple selected elements, but not stretches of text.

It's possible for other browsers that embed the Web Browser control to support multiple text ranges:

Host applications can provide a multiple selection mechanism and can return a collection of TextRange objects that represents discontinuous selections.

But as of today IE doesn't, and I don't know of any other host application that does. Or indeed of any other browser than Firefox 3 that allows it.



来源:https://stackoverflow.com/questions/707315/textrange-selection-msie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!