<html>
<body>
<p>Click the "Try it" button to set the user-select property of the p element to "none":</p>
<button onclick="myFunction()">Try it</button>
<p id="demo">After you click on the button, it is not possible to select the text of this p element (try to double-click me before and after).</p>
<script>
function myFunction() {
var x = document.getElementById("demo");
x.style.WebkitUserSelect = "none"; // Chrome, Safari, Opera
x.style.MozUserSelect = "none"; // Firefox
x.style.msUserSelect = "none"; // IE 10+
x.style.userSelect = "none"; // Standard syntax
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_userselect by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:03:42 GMT -->
</html>