文章源自玩技e族-https://www.playezu.com/15642.html
代码加密是一项很头疼的事情,在这记录下一种自我安慰型的“代码加密”方式
- <script type="text/javascript">
- //禁止鼠标右键菜单和F12打开控制台看源码
- function click(e) {
- if (document.all) {
- if (event.button==2||event.button==3) {
- alert("欢迎光临寒舍,有什么需要帮忙的话,请与站长联系!谢谢您的合作!!!");
- oncontextmenu='return false';
- }
- }
- if (document.layers) {
- if (e.which == 3) {
- oncontextmenu='return false';
- }
- }
- }
- if (document.layers) {
- document.captureEvents(Event.MOUSEDOWN);
- }
- document.onmousedown=click;
- document.oncontextmenu = new Function("return false;")
- document.onkeydown =document.onkeyup = document.onkeypress=function(){
- if(window.event.keyCode == 123) {
- window.event.returnValue=false;
- return(false);
- }
- }
- // <--123——112是F1-F12的代码数-->
- </script>
文章源自玩技e族-https://www.playezu.com/15642.html - 我们QQ群
- QQ扫一扫
-
- 微信公众号
- 公众号扫一扫
-
评论