📜  window.getselection 外部 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:13.049000             🧑  作者: Mango

代码示例1
function red(){
    // If it's not the element with an id of "foo" stop the function and return
    if(window.getSelection().baseNode.parentNode.id != "foo") return;
    ...
    // Highlight if it is our div.
}