CSS disables mouse dragging of selected content_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:48:09
Original
1463 people have browsed it

chrome -webkit-user-select:none

firxfox -moz-user-select:none

IE needs to use JS’s onSelected event.

JS code

dom.style.MozUserSelect = 'none';//fixrox JS script that disables selection
dom.style.webkitUserSelect = 'none';
if( document.all ){//Disable selection under IE
dom.onselectstart=function(){return false;}
}


source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template