Skip to content

Commit

Permalink
添加禁止F12按键,禁止进行网页调试
Browse files Browse the repository at this point in the history
  • Loading branch information
Paper-Dragon committed Nov 9, 2023
1 parent 993dbde commit 575a647
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/.vuepress/public/html/wordCloud.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@
margin: 0;
}
</style>
<script>
/*禁用F12*/
document.onkeydown = function(){
if(window.event.keyCode==123) {
alert("大佬,别扒了!不妨加个友链?");
event.preventDefault(); // 阻止默认事件行为
event.keyCode=0;
event.returnValue=false;
}
}</script>
<div id='main'></div>
<script>
var chart = echarts.init(document.getElementById('main'));
Expand Down

0 comments on commit 575a647

Please sign in to comment.