<script type="text/javascript">
document.onkeydown=function(){
var e = window.event||arguments[0];
if((e.ctrlKey)&&(e.shiftKey)&&(e.keyCode==73)){
alert('你知道的太多了!');
return false;
}
if((e.ctrlKey)&&(e.keyCode==85)){
alert('你知道的太多了!');
return false;
}
if((e.ctrlKey)&&(e.keyCode==83)){
alert('你知道的太多了!');
return false;
}
}
var threshold = 160;
window.setInterval(function() {
if (window.outerWidth - window.innerWidth > threshold ||
window.outerHeight - window.innerHeight > threshold) {
function disableDebugger() {
debugger;
}
$(document).ready(function () {
disableDebugger();
});
}
}, 1e3);
</script>
开发者工具 Source 右键 Add script to ignore list
或
Ctrl+F8
禁用开发者工具方法
本文介绍了一种通过JavaScript代码阻止用户使用浏览器的开发者工具的方法。具体实现包括禁用Ctrl+Shift+I组合键、Ctrl+U及Ctrl+S,并且监测浏览器窗口大小变化来进一步限制调试。这些技术可以增加网站内容的安全性。
2526

被折叠的 条评论
为什么被折叠?



