Stop the user from highlighting any text using javascript - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Text

Description

Stop the user from highlighting any text using javascript

Demo Code

ResultView the demo in separate window

<html>
 <head></head> 
 <body> 
  <p onselectstart="javascript:return false;">This is text you cannot select.</p> 
  <p>This is text you can.</p>  
 </body><!-- w  ww.  j a  va 2  s . c o m-->
</html>

Related Tutorials