<html>
<body>
<p>Click the button to get the value of the "user-select" property of the p element below.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo" style="user-select:none">It is not possible to select this text.</p>
<script>
function myFunction() {
alert(document.getElementById("demo").style.userSelect);
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_userselect_get by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:03:42 GMT -->
</html>