禁止右键和复制
<script language="Javascript">
document.oncontextmenu=new Function("event.returnValue=false");
document.onselectstart=new Function("event.returnValue=false");
</script>
document.oncontextmenu=new Function("event.returnValue=false");
document.onselectstart=new Function("event.returnValue=false");
</script>
禁止ctrl+s,ctrl+u,f12
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
</script>
<script>
$(document).keydown(function(e){
if( e.ctrlKey == true && e.keyCode == 83 ){
console.log('ctrl+s');
return false; // 禁止ctrl+s
}
if( e.ctrlKey == true && e.keyCode == 85 ){
console.log('ctrl+u');
return false; // 禁止ctrl+u
}
if( e.keyCode == 123 ){
console.log('f12');
return false; // 禁止f12
}
});
</script>
</script>
<script>
$(document).keydown(function(e){
if( e.ctrlKey == true && e.keyCode == 83 ){
console.log('ctrl+s');
return false; // 禁止ctrl+s
}
if( e.ctrlKey == true && e.keyCode == 85 ){
console.log('ctrl+u');
return false; // 禁止ctrl+u
}
if( e.keyCode == 123 ){
console.log('f12');
return false; // 禁止f12
}
});
</script>