Selection 对象
const selection = window.getSelection() 获取
Selection对象
Selection.toString() //获取选中字符
Selection.anchorOffset
//获取选中字符的开始
Selection.focusOffset
//获取选中字符的结束
Selection 对象
const selection = window.getSelection() 获取
Selection对象
Selection.toString() //获取选中字符
Selection.anchorOffset
//获取选中字符的开始
Selection.focusOffset
//获取选中字符的结束