用htmleidtor的el来操作 也就是用原始的document来操作
function getSelectedVal() {
var userSelection;
if (window.getSelection) {
// 现代浏览器
userSelection = window.getSelection();
} else if (document.selection) {
// IE浏览器
userSelection = document.selection.createRange();
}
return userSelection.text;
}