1.禁用浏览器右键菜单
document.oncontextmenu = new Function(“return false;”);
2.监听键盘事件
document.onkeydown = document.onkeyup = document.onkeypress = function(event) {
var e = event || window.event || arguments.callee.caller.arguments[0];
if (e && e.keyCode == 123) {
window.location = ‘about: blank’;
e.returnValue = false;
return (false);
}
}
3.检测控制台
function mAlert() {
var fn = function () {};
fn.toString = function () {
window.location = ‘about: blank’;
console.log(“呵呵”);
}
console.log("%c", fn);//请不要删除这行
};mAlert();
4.鼠标点击事件
document.onmousedown = function mdClick(event) {
var e = event || window.event || arguments.callee.caller.argum