//按键触发
document.onkeydown = function() {
//禁止ctrl+u
if (event.ctrlKey && window.event.keyCode == 85) {
return false;
}
//禁止 F12
if (window.event && window.event.keyCode == 123) {
event.keyCode = 0;
event.returnValue = false;
}
}
;
//禁止右键
document.body.oncontextmenu = function() {
self.event.returnValue = false;
}
标签:禁止,false,ctrl,keyCode,window,右键,f12,event
From: https://blog.51cto.com/u_15961927/6846983