function getSelectedText() {
if (window.getSelection) return window.getSelection().toString();
if (document.getSelection) return document.getSelection();
if (document.selection) return document.selection.createRange().text
}
得到鼠标选择的文字
最新推荐文章于 2023-07-27 14:57:11 发布