TAG
JavaScript
Result
Run
License
<p id="text">A bad workman blames his tools</p>
window.addEventListener("load", function() { const elText = document.getElementById("text"); document.addEventListener("selectionchange", e => { const selection = document.getSelection(); console.log(selection.toString()); }); });
Console
expand_less
License
License
by DevDic
Close