{"id":27977,"date":"2024-11-24T15:34:07","date_gmt":"2024-11-24T07:34:07","guid":{"rendered":"https:\/\/fwq.ai\/blog\/27977\/"},"modified":"2024-11-24T15:34:07","modified_gmt":"2024-11-24T07:34:07","slug":"%e5%a6%82%e4%bd%95%e9%98%b2%e6%ad%a2%e6%b5%8f%e8%a7%88%e5%99%a8%e9%9a%90%e8%97%8f%e5%85%83%e7%b4%a0%e7%af%a1%e6%94%b9%e7%bd%91%e9%a1%b5%e6%b0%b4%e5%8d%b0%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27977\/","title":{"rendered":"\u5982\u4f55\u9632\u6b62\u6d4f\u89c8\u5668\u9690\u85cf\u5143\u7d20\u7be1\u6539\u7f51\u9875\u6c34\u5370\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173137446531123.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u9632\u6b62\u6d4f\u89c8\u5668\u9690\u85cf\u5143\u7d20\u7be1\u6539\u7f51\u9875\u6c34\u5370\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u9632\u6b62\u6d4f\u89c8\u5668\u9690\u85cf\u5143\u7d20\u7be1\u6539\u7f51\u9875\u6c34\u5370\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u9632\u6b62\u6d4f\u89c8\u5668\u9690\u85cf\u5143\u7d20\u7be1\u6539\u7f51\u9875\u6c34\u5370<\/strong><\/p>\n<p>\u5728\u7f51\u9875\u6c34\u5370\u7684\u8bbe\u8ba1\u4e2d\uff0c\u963b\u6b62\u7528\u6237\u4f7f\u7528\u6d4f\u89c8\u5668\u63d0\u4f9b\u7684\u201c\u9690\u85cf\u5143\u7d20\u201d\u9009\u9879\u81f3\u5173\u91cd\u8981\u3002\u672c\u6587\u5c06\u63a2\u8ba8\u7981\u6b62\u6b64\u9009\u9879\u7684\u65b9\u6cd5\uff0c\u4ee5\u53ca\u9690\u85cf\u5143\u7d20\u89e6\u53d1\u4e8b\u4ef6\u548c\u4fee\u6539\u6837\u5f0f\u7684\u60c5\u51b5\u3002<\/p>\n<p><strong>\u7981\u6b62\u53f3\u952e\u67e5\u770b\u6e90\u7801\u548c\u63a7\u5236\u53f0<\/strong><\/p>\n<p><strong>1. \u7981\u6b62 F12 <\/strong><\/p>\n<pre>document.addEventListener('keydown', function(event){\n&nbsp;&nbsp;&nbsp;return 123 != event.keyCode || (event.returnValue = false)\n});<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>2. \u7981\u6b62\u53f3\u952e\u3001\u9009\u62e9\u548c\u590d\u5236<\/strong><\/p>\n<pre>document.addEventListener(\u2018'contextmenu'\u2019, function(event){\n&nbsp;&nbsp;&nbsp;return event.returnValue = false\n})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u76d1\u6d4b\u6d4f\u89c8\u5668\u5bbd\u9ad8\u53d8\u5316<\/strong><\/p>\n<p>\u901a\u8fc7\u76d1\u6d4b\u6d4f\u89c8\u5668\u53ef\u89c6\u533a\u57df\u548c\u6d4f\u89c8\u5668\u6574\u4f53\u533a\u57df\u7684\u5bbd\u9ad8\u5dee\uff0c\u53ef\u4ee5\u68c0\u6d4b\u63a7\u5236\u53f0\u662f\u5426\u5f00\u542f\u3002<\/p>\n<pre>function resize(){\n    var threshold = 200;\n    var widthThreshold = window.outerWidth - window.innerWidth &gt; threshold;\n    var heightThreshold = window.outerHeight - window.innerHeight &gt; threshold;\n    if(widthThreshold || heightThreshold){\n        console.log('\u63a7\u5236\u53f0\u6253\u5f00\u4e86')\n    }\n}\nwindow.addEventListener('resize', resize);\nresize()<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u65e0\u9650\u9012\u5f52\u5229\u7528 debugger \u7279\u6027<\/strong><\/p>\n<pre>function check() {\n    function doCheck(a) {\n        (function() {}[\"constructor\"](\"debugger\")()); \/\/debugger\n        doCheck(++a);\n    }\n    try {\n        doCheck(0)\n    } catch(err) {\n        console.log(err)\n    }\n};<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u5176\u4ed6\u65b9\u6cd5<\/strong><\/p>\n<p><strong>1. \u7981\u6b62\u6253\u5f00\u63a7\u5236\u53f0<\/strong><\/p>\n<p><strong>2. \u8f6c\u6362\u4e3a\u56fe\u7247<\/strong><\/p>\n<p>\u5c06\u6574\u4f53\u9875\u9762\u8f6c\u6362\u4e3a\u56fe\u7247\uff0c\u8fd9\u6837\u7528\u6237\u65e0\u6cd5\u5355\u72ec\u79fb\u9664\u9690\u85cf\u5143\u7d20\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u9632\u6b62\u6d4f\u89c8\u5668\u9690\u85cf\u5143\u7d20\u7be1\u6539\u7f51\u9875\u6c34\u5370\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9632\u6b62\u6d4f\u89c8\u5668\u9690\u85cf\u5143\u7d20\u7be1\u6539\u7f51\u9875\u6c34\u5370 \u5728\u7f51\u9875\u6c34\u5370\u7684\u8bbe\u8ba1\u4e2d\uff0c\u963b\u6b62\u7528\u6237\u4f7f\u7528\u6d4f\u89c8\u5668\u63d0\u4f9b\u7684\u201c\u9690\u85cf\u5143\u7d20\u201d\u9009\u9879\u81f3\u5173\u91cd\u8981\u3002\u672c\u6587\u5c06\u63a2\u8ba8\u7981\u6b62\u6b64\u9009\u9879\u7684\u65b9\u6cd5\uff0c\u4ee5\u53ca\u9690\u85cf\u5143\u7d20\u89e6\u53d1\u4e8b\u4ef6\u548c\u4fee\u6539\u6837\u5f0f\u7684\u60c5\u51b5\u3002 \u7981\u6b62\u53f3\u952e\u67e5\u770b\u6e90\u7801\u548c\u63a7\u5236\u53f0 1. \u7981\u6b62 F12 document.addEventListener(&#8216;keydown&#8217;, function(event){ &nbsp;&nbsp;&nbsp;return 123 != event.keyCode || (event.returnValue = false) }); \u767b\u5f55\u540e\u590d\u5236 2. \u7981\u6b62\u53f3\u952e\u3001\u9009\u62e9\u548c\u590d\u5236 document.addEventListener(\u2018&#8217;contextmenu&#8217;\u2019, function(event){ &nbsp;&nbsp;&nbsp;return event.returnValue = false }) \u767b\u5f55\u540e\u590d\u5236 \u76d1\u6d4b\u6d4f\u89c8\u5668\u5bbd\u9ad8\u53d8\u5316 \u901a\u8fc7\u76d1\u6d4b\u6d4f\u89c8\u5668\u53ef\u89c6\u533a\u57df\u548c\u6d4f\u89c8\u5668\u6574\u4f53\u533a\u57df\u7684\u5bbd\u9ad8\u5dee\uff0c\u53ef\u4ee5\u68c0\u6d4b\u63a7\u5236\u53f0\u662f\u5426\u5f00\u542f\u3002 function resize(){ var threshold = 200; var widthThreshold = window.outerWidth &#8211; window.innerWidth &gt; threshold; var heightThreshold = window.outerHeight &#8211; window.innerHeight &gt; threshold; if(widthThreshold || heightThreshold){ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-27977","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=27977"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27977\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}