if (window.getSelection) {//一般浏览器
userSelection = window.getSelection();
} else if (document.selection) {
//IE浏览器、Opera
userSelection = document.selection.createRange();
}
var strInput="";
try{
strInput+=" "+userSelection.toString();
}catch(e){//I兼容IE

strInput
}
谷歌中对象

 IE中对象

js 获取鼠标选中值

 


 
                    
            
                

相关文章: