以下代码可以在所有浏览器中屏蔽文本选择
var body = document.body; body.style.userSelect = 'none'; body.style.webkitUserSelect = 'none'; body.style.msUserSelect = 'none'; body.style.mozUserSelect = 'none';
以下代码可以在所有浏览器中屏蔽文本选择
var body = document.body; body.style.userSelect = 'none'; body.style.webkitUserSelect = 'none'; body.style.msUserSelect = 'none'; body.style.mozUserSelect = 'none';