【Javascript】常用代码片段
屏蔽右键
(function disableTool(){
document.addEventListener('keydown', function (event) {
return 123 != event.keyCode || (event.returnValue = false);
});
document.addEventListener('contextmenu', function (event) {
return event.returnValue = false;
});
})();