IE其他版本的获取方式如下:
var isIE=!!document.all;
if(isIE){
var rng=window.getSelection.createRange();
str = rng.text;
} else {
var s = window.getSelection();
str = s.toString();
}
请问IE11下如何获取?
IE其他版本的获取方式如下:
var isIE=!!document.all;
if(isIE){
var rng=window.getSelection.createRange();
str = rng.text;
} else {
var s = window.getSelection();
str = s.toString();
}
请问IE11下如何获取?
I think, I found a solution. Not the best and nicest but it is working for me: I can create the exact same TextRange from Selection.