划词检索
function showSelection() {
let selection = document.getSelection();
console.log(selection);
return selection.toString();
}
document.addEventListener("selectionchange", showSelection)
muspi_merol / blog / why-promplate
最后更新于:2023年9月14日
function showSelection() {
let selection = document.getSelection();
console.log(selection);
return selection.toString();
}
document.addEventListener("selectionchange", showSelection)