HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <h2>CSS user-select Property</h2> <p id="point">This is a paragraph</p> <button onclick="myFunction()">Click Me</button> <script> function myFunction(){ var x = document.getElementById("point"); x.style.userSelect = "none"; } </script> <p><strong>Note</strong>: Click on the button and then try to select the paragraph.</p> </body> </html>
OUTPUT
×

Save as Private