首页 > Web开发 > 详细

js防复制、禁止右键

时间:2015-04-28 21:00:58      阅读:267      评论:0      收藏:0      [点我收藏+]
// JavaScript Document
$(function(){ 
$(document).bind("contextmenu",function(e){ return false; }); 


}); 
if (typeof(document.onselectstart) != "undefined") {       
    // IE下禁止元素被选取       
    document.onselectstart = new Function("return false");       
} else {
    // firefox下禁止元素被选取的变通办法       
    document.onmousedown = new Function("return false");       
    document.onmouseup = new Function("return true");       
}

js防复制、禁止右键

原文:http://blog.csdn.net/huileiforever/article/details/45341799

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!