window.setInterval(function(){
document.oncontextmenu=function(e){return false;}
document.onselectstart = document.oncontextmenu= document.onmousedown= function(){return false;};
document.onkeydown = keyDown;
},150)
function keyDown(e) {
var currKey=0,e=e||event;
currKey=e.keyCode||e.which||e.charCode;
var keyName = String.fromCharCode(currKey);
if(currKey == 67 || currKey == 86 || currKey == 17 || currKey == 65) {
try{
window.clipboardData.setData("Text","");
}catch(e){
//window.open("为保护产权,不支持该操作!");
// alert("为保护产权,不支持该操作!");
location.replace(location.href);
}finally{
return false;
}
}
}
禁止IE下右键等功能
最新推荐文章于 2022-07-06 13:46:10 发布