小编Boh*_*kyi的帖子

在IE10中打破了getSelection()

我在我的项目中使用window.getSelection()方法来生成可引用的文本

它在所有现代浏览器中运行得很好,不管IE10如何.在IE10控制台中返回正确的文本,但选择中断.

我使用的唯一代码:

text = window.getSelection().toString();
console.log(text);
Run Code Online (Sandbox Code Playgroud)

此代码调用mouseup事件.

有谁知道解决方案?

javascript internet-explorer getselection internet-explorer-10

6
推荐指数
1
解决办法
921
查看次数