Home >Web Front-end >HTML Tutorial >Disable text on web pages from being selected_html/css_WEB-ITnose

Disable text on web pages from being selected_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 12:34:221465browse

There are different methods for different browsers, divided into event type and attribute type. The sample code is as follows:

 

 1 <html> 2     <head> 3         <style type="text/css"> 4             body{-moz-user-select:none} 5         </style> 6     </head> 7  8 <body onselectstart="return false;"> 9     this is a test!10 </body>11 </html>

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn