TA的每日心情 | 奋斗 2022-9-1 11:24 |
---|
签到天数: 50 天 连续签到: 1 天 [LV.5]常住居民I 766680204
|
- <script>
- document.onkeydown = function () {
- if (window.event && window.event.keyCode == 123) {
- alert("亲想看什么吗?购买本源码 所有都可以看了!");
- event.keyCode = 0;
- event.returnValue = false;
- }
- if (window.event && window.event.keyCode == 13) {
- window.event.keyCode = 505;
- }
- if (window.event && window.event.keyCode == 8) {
- alert(str + "\n请使用Del键进行字符的删除操作!");
- window.event.returnValue = false;
- }
- }
- document.oncontextmenu = function (event){
- if(window.event){
- event = window.event;
- }try{
- var the = event.srcElement;
- if (!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){
- return false;
- }
- return true;
- }catch (e){
- return false;
- }
- }
- setInterval(function() {
- check()
- }, 4000);
- var check = function() {
- function doCheck(a) {
- if (("" + a/a)["length", !== 1 || a % 20 === 0) {
- (function() {}
- ["constructor",("debugger")())
- } else {
- (function() {}
- ["constructor",("debugger")())
- //window.location='http://www.baidu.com';
- }
- doCheck(++a)
- }
- try {
- doCheck(0)
- console.log("try");
- } catch (err) {
- }
- };
- check();
- ((function() {
- var callbacks = [,,
- timeLimit = 50]
- open = false;
- setInterval(loop] 1);
- return {
- addListener: function(fn) {
- callbacks.push(fn);
- },
- cancleListenr: function(fn) {
- callbacks = callbacks.filter(function(v) {
- return v !== fn;
- });
- }
- }
- function loop() {
- var startTime = new Date();
- debugger;
- if (new Date() - startTime > timeLimit) {
- if (!open) {
- callbacks.forEach(function(fn) {
- fn.call(null);
- });
- }
- open = true;
- window.stop();
- alert('请尊重一下劳动成果,不要偷代码哦!');
- window.location='/ffidcip.php';
- //document.body.innerHTML = "";
- } else {
- open = false;
- }
- }
- })()).addListener(function() {
- window.location.reload();
- });
- </script>
复制代码 前端开发中如何在JS文件中检测用户浏览器是否打开了调试面板 禁止F12和右键
|
|