摘要:
function getSelectedText(){ var selectedText = ''; if (document.selection) { var range = document.selection.createRange(); selectedText = range.text; } else if (window.getSelection) { selectedText = window.getSelection(); } return selectedText;} 阅读全文