通过document.getSelection().toString()来获取选择的文本
Aug 16, 2022
1 min read
getSelection() 方法表示用户选择的文本范围或光标的当前位置。