{"id":26253,"date":"2024-11-24T10:32:02","date_gmt":"2024-11-24T02:32:02","guid":{"rendered":"https:\/\/fwq.ai\/blog\/26253\/"},"modified":"2024-11-24T10:32:02","modified_gmt":"2024-11-24T02:32:02","slug":"%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0-a-%e6%a0%87%e7%ad%be%e7%82%b9%e5%87%bb%e5%90%8e%e5%81%9c%e7%95%99%e4%b8%80%e7%a7%92%e5%86%8d%e8%b7%b3%e8%bd%ac%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/26253\/","title":{"rendered":"\u5982\u4f55\u5b9e\u73b0 a \u6807\u7b7e\u70b9\u51fb\u540e\u505c\u7559\u4e00\u79d2\u518d\u8df3\u8f6c\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173086820073651.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5b9e\u73b0 a \u6807\u7b7e\u70b9\u51fb\u540e\u505c\u7559\u4e00\u79d2\u518d\u8df3\u8f6c\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5b9e\u73b0 a \u6807\u7b7e\u70b9\u51fb\u540e\u505c\u7559\u4e00\u79d2\u518d\u8df3\u8f6c\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u4e3a a \u6807\u7b7e\u6dfb\u52a0\u70b9\u51fb\u540e\u505c\u7559\u4e00\u79d2\u518d\u8df3\u8f6c\u7684\u529f\u80fd<\/strong><\/p>\n<p>\u5f88\u591a\u65f6\u5019\uff0c\u6211\u4eec\u5728\u70b9\u51fb a \u6807\u7b7e\u540e\u5e0c\u671b\u80fd\u6709\u77ed\u6682\u7684\u52a8\u753b\u6548\u679c\uff0c\u7c7b\u4f3c\u4e8e loading\uff0c\u5b8c\u6210\u540e\u518d\u8df3\u8f6c\u5230\u65b0\u9875\u9762\u3002\u90a3\u4e48\uff0c\u5982\u4f55\u5b9e\u73b0\u8fd9\u6837\u7684\u529f\u80fd\u5462\uff1f<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<p>\u5982\u697c\u4e0a\u6240\u8bf4\uff0c\u53ea\u80fd\u901a\u8fc7 JS \u52ab\u6301\u6765\u5b9e\u73b0\uff1a<\/p>\n<pre>&lt;a href=\"https:\/\/www.baidu.com\" target=\"_blank\" onclick=\"onLinkClick\" &gt;\u8fd9\u662f\u4e00\u4e2a\u94fe\u63a5&lt;\/a&gt;\n\n&lt;script&gt;\n  const onLinkClick = function(e) {\n    \/\/ \u963b\u6b62\u9ed8\u8ba4\u8df3\u8f6c\u884c\u4e3a\n    e.preventDefault();\n    \/\/ \u8bbe\u7f6eloading\n    \/\/ ...\n    const href = e.target.getAttribute('href');\n    const openType = e.target.getAttribute('target');\n    \/\/ 1\u79d2\u540e\u8df3\u8f6c\n    setTimeout(() =&gt; {\n      window.open(href, openType);\n    }, 1000);\n  }\n&lt;\/script&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5b9e\u73b0 a \u6807\u7b7e\u70b9\u51fb\u540e\uff0c\u5148\u52a0\u8f7d\u52a8\u753b\uff0c\u518d\u8df3\u8f6c\u9875\u9762\u7684\u6548\u679c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5b9e\u73b0 a \u6807\u7b7e\u70b9\u51fb\u540e\u505c\u7559\u4e00\u79d2\u518d\u8df3\u8f6c\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>\u4e3a a \u6807\u7b7e\u6dfb\u52a0\u70b9\u51fb\u540e\u505c\u7559\u4e00\u79d2\u518d\u8df3\u8f6c\u7684\u529f\u80fd \u5f88\u591a\u65f6\u5019\uff0c\u6211\u4eec\u5728\u70b9\u51fb a \u6807\u7b7e\u540e\u5e0c\u671b\u80fd\u6709\u77ed\u6682\u7684\u52a8\u753b\u6548\u679c\uff0c\u7c7b\u4f3c\u4e8e loading\uff0c\u5b8c\u6210\u540e\u518d\u8df3\u8f6c\u5230\u65b0\u9875\u9762\u3002\u90a3\u4e48\uff0c\u5982\u4f55\u5b9e\u73b0\u8fd9\u6837\u7684\u529f\u80fd\u5462\uff1f \u89e3\u51b3\u65b9\u6cd5 \u5982\u697c\u4e0a\u6240\u8bf4\uff0c\u53ea\u80fd\u901a\u8fc7 JS \u52ab\u6301\u6765\u5b9e\u73b0\uff1a &lt;a href=&#8221;https:\/\/www.baidu.com&#8221; target=&#8221;_blank&#8221; onclick=&#8221;onLinkClick&#8221; &gt;\u8fd9\u662f\u4e00\u4e2a\u94fe\u63a5&lt;\/a&gt; &lt;script&gt; const onLinkClick = function(e) { \/\/ \u963b\u6b62\u9ed8\u8ba4\u8df3\u8f6c\u884c\u4e3a e.preventDefault(); \/\/ \u8bbe\u7f6eloading \/\/ &#8230; const href = e.target.getAttribute(&#8216;href&#8217;); const openType = e.target.getAttribute(&#8216;target&#8217;); \/\/ 1\u79d2\u540e\u8df3\u8f6c setTimeout(() =&gt; { window.open(href, openType); }, 1000); } &lt;\/script&gt; \u767b\u5f55\u540e\u590d\u5236 \u901a\u8fc7\u8fd9\u79cd\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5b9e\u73b0 a \u6807\u7b7e\u70b9\u51fb\u540e\uff0c\u5148\u52a0\u8f7d\u52a8\u753b\uff0c\u518d\u8df3\u8f6c\u9875\u9762\u7684\u6548\u679c\u3002 \u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5b9e\u73b0 a \u6807\u7b7e\u70b9\u51fb\u540e\u505c\u7559\u4e00\u79d2\u518d\u8df3\u8f6c\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},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-26253","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/26253","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=26253"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/26253\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=26253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=26253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=26253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}