CSS prevents users from selecting text (compatible with all browsers)
If you disable selection for the entire page, you can use the following CSS
Body{-Webkit-Touch-Callout:None;-Webkit-User-Select:None;-khtml-user-select< Span class= "pun" >: None;-moz-user- select: None;-ms-user- select: None;-select: None;< Span class= "PLN" >}
If you want the specified element to be forbidden, look at the following sample code:
<!doctype html><style Type="Text/css">*.Unselectable{ -Moz-User-Select: -Moz-None; -Khtml-User-Select:None; -Webkit-User-Select:None; /* Introduced in IE 10. See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/*/ -Ms-User-Select: None; User-select< Span class= "pun" >: None;}</style></ Head><body><div class= "unselectable" ><p> This is a long text. La la la </p></div> </body></HTML>
CSS prevents users from selecting text (compatible with all browsers)