{"id":1738,"date":"2024-11-10T10:13:48","date_gmt":"2024-11-10T02:13:48","guid":{"rendered":"https:\/\/fwq.ai\/blog\/1738\/"},"modified":"2024-11-10T10:13:48","modified_gmt":"2024-11-10T02:13:48","slug":"%e5%a6%82%e4%bd%95%e7%bb%99%e4%bb%a3%e7%a0%81%e6%b7%bb%e5%8a%a0%e8%a1%8c%e5%8f%b7%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/1738\/","title":{"rendered":"\u5982\u4f55\u7ed9\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173054719496967.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u7ed9\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u7ed9\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\uff1f\u63d2\u56fe\" \/><\/p>\n<p>\u5982\u4f55\u7ed9\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\uff1f<\/p>\n<p><strong>\u6700\u7b80\u5355\u7684\u505a\u6cd5\uff1a\u4f7f\u7528 <\/strong>xmp<strong> \u6807\u7b7e<\/strong><\/p>\n<p>\u4f7f\u7528 <strong>xmp<\/strong> \u6807\u7b7e\u662f\u4e00\u79cd\u7ed9\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\u7684\u7b80\u4fbf\u65b9\u6cd5\uff0c\u4f46\u8981\u6ce8\u610f\u8be5\u6807\u7b7e\u5df2\u4e0d\u518d\u4f7f\u7528\u3002<\/p>\n<p><strong>\u8f6c\u6362\u4e3a <\/strong>pre<strong> \u6807\u7b7e<\/strong><\/p>\n<p>\u8981\u4f7f\u7528 <strong>pre<\/strong> \u6807\u7b7e\u4ee3\u66ff <strong>xmp<\/strong>\uff0c\u9700\u8981\u5bf9 HTML \u4ee3\u7801\u8fdb\u884c\u8f6c\u4e49\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre>&lt;div&gt;\n&lt;pre class=\"brush:php;toolbar:false\"&gt;&amp;lt;!DOCTYPE html&amp;gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    <\/p>\n<pre>&amp;lt;html lang=\"en\"&amp;gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    <\/p>\n<pre>&amp;lt;head&amp;gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    <\/p>\n<pre>    &amp;lt;meta charset=\"UTF-8\"&amp;gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    <\/p>\n<pre>    &amp;lt;title&amp;gt;\u884c\u53f7&lt;\/title&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    <\/p>\n<pre>&amp;lt;\/head&amp;gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    <\/p>\n<pre>&amp;lt;body&amp;gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    <\/p>\n<pre>    &amp;lt;p&amp;gt;\u6d4b\u8bd5\u9875\u9762&lt;\/p&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    <\/p>\n<pre>&amp;lt;\/body&amp;gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    <\/p>\n<pre>&amp;lt;\/html&amp;gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p><strong>\u7b80\u6d01\u7684 JavaScript \u89e3\u51b3\u65b9\u6848<\/strong><\/p>\n<p>\u8fd8\u6709\u4e00\u79cd\u4f7f\u7528 JavaScript \u7684\u66f4\u7b80\u6d01\u7684\u65b9\u6cd5\uff1a<\/p>\n<pre>&lt;div id=\"code\" style=\"font-size:12px\"&gt;&lt;\/div&gt;\n&lt;style&gt;\n  * {margin: 0; padding: 0;}\n  #code p::before {content: attr(data-line-number);min-width: 50px;text-align: right;display: inline-block;padding: 0 5px;color: #ccc;}\n&lt;\/style&gt;\n&lt;script&gt;\n  var $code = document.getElementById('code');\n  `&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;title&gt;\u884c\u53f7&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;p&gt;\u6d4b\u8bd5\u9875\u9762&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;`.split('\n').forEach((text, index) =&gt; {\n    var $line = document.createElement('p');\n    $line.dataset.lineNumber = index + 1;\n    $line.innerText = text;\n    $code.appendChild($line);\n  });\n&lt;\/script&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u7ed9\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\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\u7ed9\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\uff1f \u6700\u7b80\u5355\u7684\u505a\u6cd5\uff1a\u4f7f\u7528 xmp \u6807\u7b7e \u4f7f\u7528 xmp \u6807\u7b7e\u662f\u4e00\u79cd\u7ed9\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\u7684\u7b80\u4fbf\u65b9\u6cd5\uff0c\u4f46\u8981\u6ce8\u610f\u8be5\u6807\u7b7e\u5df2\u4e0d\u518d\u4f7f\u7528\u3002 \u8f6c\u6362\u4e3a pre \u6807\u7b7e \u8981\u4f7f\u7528 pre \u6807\u7b7e\u4ee3\u66ff xmp\uff0c\u9700\u8981\u5bf9 HTML \u4ee3\u7801\u8fdb\u884c\u8f6c\u4e49\uff0c\u5982\u4e0b\u6240\u793a\uff1a &lt;div&gt; &lt;pre class=&#8221;brush:php;toolbar:false&#8221;&gt;&amp;lt;!DOCTYPE html&amp;gt; \u767b\u5f55\u540e\u590d\u5236 &amp;lt;html lang=&#8221;en&#8221;&amp;gt; \u767b\u5f55\u540e\u590d\u5236 &amp;lt;head&amp;gt; \u767b\u5f55\u540e\u590d\u5236 &amp;lt;meta charset=&#8221;UTF-8&#8243;&amp;gt; \u767b\u5f55\u540e\u590d\u5236 &amp;lt;title&amp;gt;\u884c\u53f7&lt;\/title&gt; \u767b\u5f55\u540e\u590d\u5236 &amp;lt;\/head&amp;gt; \u767b\u5f55\u540e\u590d\u5236 &amp;lt;body&amp;gt; \u767b\u5f55\u540e\u590d\u5236 &amp;lt;p&amp;gt;\u6d4b\u8bd5\u9875\u9762&lt;\/p&gt; \u767b\u5f55\u540e\u590d\u5236 &amp;lt;\/body&amp;gt; \u767b\u5f55\u540e\u590d\u5236 &amp;lt;\/html&amp;gt; \u767b\u5f55\u540e\u590d\u5236 \u7b80\u6d01\u7684 JavaScript \u89e3\u51b3\u65b9\u6848 \u8fd8\u6709\u4e00\u79cd\u4f7f\u7528 JavaScript \u7684\u66f4\u7b80\u6d01\u7684\u65b9\u6cd5\uff1a &lt;div id=&#8221;code&#8221; style=&#8221;font-size:12px&#8221;&gt;&lt;\/div&gt; &lt;style&gt; * {margin: 0; padding: [&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-1738","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1738","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=1738"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1738\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=1738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=1738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=1738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}