方法有二
一: css 方法
user-seletct: none;
-webkit-user-seletct: none;
-moz-user-seletct: none;
-ms-user-seletct: none;
none: 不能選中內容
text: 能選中內容
二:js 方法
document.body.onselectstart = function(){
return false;
}
返回 false,不能選中
返回 true,能選中
方法有二
一: css 方法
user-seletct: none;
-webkit-user-seletct: none;
-moz-user-seletct: none;
-ms-user-seletct: none;
none: 不能選中內容
text: 能選中內容
二:js 方法
document.body.onselectstart = function(){
return false;
}
返回 false,不能選中
返回 true,能選中
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。