{"id":27830,"date":"2024-11-24T12:28:41","date_gmt":"2024-11-24T04:28:41","guid":{"rendered":"https:\/\/fwq.ai\/blog\/27830\/"},"modified":"2024-11-24T12:28:41","modified_gmt":"2024-11-24T04:28:41","slug":"%e5%a6%82%e4%bd%95%e9%98%b2%e6%ad%a2%e7%94%a8%e6%88%b7%e4%bd%bf%e7%94%a8%e6%b5%8f%e8%a7%88%e5%99%a8%e5%b7%a5%e5%85%b7%e9%9a%90%e8%97%8f%e7%bd%91%e9%a1%b5%e6%b0%b4%e5%8d%b0%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27830\/","title":{"rendered":"\u5982\u4f55\u9632\u6b62\u7528\u6237\u4f7f\u7528\u6d4f\u89c8\u5668\u5de5\u5177\u9690\u85cf\u7f51\u9875\u6c34\u5370\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173132157535415.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u9632\u6b62\u7528\u6237\u4f7f\u7528\u6d4f\u89c8\u5668\u5de5\u5177\u9690\u85cf\u7f51\u9875\u6c34\u5370\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u9632\u6b62\u7528\u6237\u4f7f\u7528\u6d4f\u89c8\u5668\u5de5\u5177\u9690\u85cf\u7f51\u9875\u6c34\u5370\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u963b\u6b62\u7528\u6237\u4f7f\u7528\u6d4f\u89c8\u5668\u9690\u85cf\u5143\u7d20\u8bbe\u7f6e<\/strong><\/p>\n<p>\u5728\u5236\u4f5c\u7f51\u9875\u6c34\u5370\u65f6\uff0c\u4e3a\u9632\u6b62\u7528\u6237\u7be1\u6539\uff0c\u9700\u8003\u8651\u6d4f\u89c8\u5668\u63d0\u4f9b\u7684\u9690\u85cf\u5143\u7d20\u9009\u9879\u5e26\u6765\u7684\u6f5c\u5728\u98ce\u9669\u3002\u4ee5\u4e0b\u662f\u7981\u6b62\u6d4f\u89c8\u5668\u9690\u85cf\u5143\u7d20\u7684\u51e0\u79cd\u65b9\u6cd5\uff1a<\/p>\n<ol>\n<li><strong>\u7981\u6b62\u53f3\u952e\u67e5\u770b\u6e90\u7801\u548c F12<\/strong><\/li>\n<\/ol>\n<pre>\/\/ \u7981\u6b62 F12 \u952e\u76d8\u4e8b\u4ef6\ndocument.addEventListener('keydown', function(event) {\n  return 123 != event.keyCode || (event.returnValue = false)\n});\n\n\/\/ \u7981\u6b62\u53f3\u952e\u3001\u9009\u62e9\u3001\u590d\u5236\ndocument.addEventListener('contextmenu', function(event) {\n  return event.returnValue = false\n})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ol>\n<li><strong>\u901a\u8fc7\u9875\u9762\u5bbd\u5ea6\u53d8\u5316\u76d1\u6d4b\u63a7\u5236\u53f0<\/strong><\/li>\n<\/ol>\n<p>\u76d1\u6d4b\u6d4f\u89c8\u5668\u7684\u53ef\u89c6\u533a\u57df\u5bbd\u9ad8\u548c\u6d4f\u89c8\u5668\u5bbd\u9ad8\u7684\u5dee\u503c\u3002\u5982\u679c\u5dee\u503c\u5927\u4e8e\u6307\u5b9a\u9608\u503c\uff0c\u5219\u8ba4\u4e3a\u63a7\u5236\u53f0\u5df2\u88ab\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<ol>\n<li><strong>\u5229\u7528 debugger \u7684\u7279\u6027\u8fdb\u884c\u65e0\u9650\u9012\u5f52<\/strong><\/li>\n<\/ol>\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>\u5982\u679c\u63a7\u5236\u53f0\u672a\u5f00\u542f\uff0cdebugger \u5c06\u4e0d\u4f1a\u8d77\u4f5c\u7528\uff0c\u4f46\u9012\u5f52\u4f1a\u7ee7\u7eed\uff0c\u76f4\u81f3\u6d4f\u89c8\u5668\u629b\u51fa\u9519\u8bef\u3002\u5982\u679c\u63a7\u5236\u53f0\u5f00\u542f\uff0c\u5219\u4f1a\u89e6\u53d1\u4e0d\u65ad\u65ad\u70b9\u7684\u8c03\u8bd5\uff0c\u4e25\u91cd\u65f6\u53ef\u80fd\u5bfc\u81f4\u6d4f\u89c8\u5668\u5361\u6b7b\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u8003\u8651\u5c06\u7f51\u9875\u6574\u4f53\u8f6c\u6362\u6210\u56fe\u7247\uff0c\u4ee5\u907f\u514d\u7528\u6237\u5355\u72ec\u79fb\u9664\u9690\u85cf\u5143\u7d20\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u9632\u6b62\u7528\u6237\u4f7f\u7528\u6d4f\u89c8\u5668\u5de5\u5177\u9690\u85cf\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>\u5982\u4f55\u963b\u6b62\u7528\u6237\u4f7f\u7528\u6d4f\u89c8\u5668\u9690\u85cf\u5143\u7d20\u8bbe\u7f6e \u5728\u5236\u4f5c\u7f51\u9875\u6c34\u5370\u65f6\uff0c\u4e3a\u9632\u6b62\u7528\u6237\u7be1\u6539\uff0c\u9700\u8003\u8651\u6d4f\u89c8\u5668\u63d0\u4f9b\u7684\u9690\u85cf\u5143\u7d20\u9009\u9879\u5e26\u6765\u7684\u6f5c\u5728\u98ce\u9669\u3002\u4ee5\u4e0b\u662f\u7981\u6b62\u6d4f\u89c8\u5668\u9690\u85cf\u5143\u7d20\u7684\u51e0\u79cd\u65b9\u6cd5\uff1a \u7981\u6b62\u53f3\u952e\u67e5\u770b\u6e90\u7801\u548c F12 \/\/ \u7981\u6b62 F12 \u952e\u76d8\u4e8b\u4ef6 document.addEventListener(&#8216;keydown&#8217;, function(event) { return 123 != event.keyCode || (event.returnValue = false) }); \/\/ \u7981\u6b62\u53f3\u952e\u3001\u9009\u62e9\u3001\u590d\u5236 document.addEventListener(&#8216;contextmenu&#8217;, function(event) { return event.returnValue = false }) \u767b\u5f55\u540e\u590d\u5236 \u901a\u8fc7\u9875\u9762\u5bbd\u5ea6\u53d8\u5316\u76d1\u6d4b\u63a7\u5236\u53f0 \u76d1\u6d4b\u6d4f\u89c8\u5668\u7684\u53ef\u89c6\u533a\u57df\u5bbd\u9ad8\u548c\u6d4f\u89c8\u5668\u5bbd\u9ad8\u7684\u5dee\u503c\u3002\u5982\u679c\u5dee\u503c\u5927\u4e8e\u6307\u5b9a\u9608\u503c\uff0c\u5219\u8ba4\u4e3a\u63a7\u5236\u53f0\u5df2\u88ab\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; [&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-27830","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27830","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=27830"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27830\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}