{"id":11570,"date":"2025-03-23T23:34:55","date_gmt":"2025-03-23T15:34:55","guid":{"rendered":"https:\/\/www.zhangxinxu.com\/wordpress\/?p=11570"},"modified":"2025-06-27T17:32:12","modified_gmt":"2025-06-27T09:32:12","slug":"html-element-elementinternals-attachinternals","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2025\/03\/html-element-elementinternals-attachinternals\/","title":{"rendered":"\u7814\u7a76\u4e0battachInternals\u65b9\u6cd5\uff0c\u53ef\u8ba9\u666e\u901a\u5143\u7d20\u6709\u8868\u5355\u7279\u6027"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=11570\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=11570<\/a><br \/>\n\u672c\u6587\u53ef\u5168\u6587\u8f6c\u8f7d\uff0c\u72ec\u7acb\u57df\u540d\u4e2a\u4eba\u7f51\u7ad9\u65e0\u9700\u6388\u6743\uff0c\u4f46\u9700\u8981\u4fdd\u7559\u539f\u4f5c\u8005\u3001\u51fa\u5904\u4ee5\u53ca\u6587\u4e2d\u94fe\u63a5\uff0c\u4efb\u4f55\u7f51\u7ad9\u5747\u53ef\u6458\u8981\u805a\u5408\uff0c\u5546\u7528\u8bf7\u8054\u7cfb\u6388\u6743\u3002<\/p>\n<p><script>window.wxShareImgUrl = 'https:\/\/www.zhangxinxu.com\/study\/image\/share\/201901-css-var.jpg';<\/script><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202503\/attach-inter-cover.jpg\" width=\"320\" height=\"204\" alt=\"\u5c01\u9762\u5360\u4f4d\u56fe\" class=\"alignright clip thumb size-medium\" \/><\/p>\n<p>\u672c\u6587\u53c8\u662f\u72ec\u5bb6\u5185\u5bb9\uff0c\u56e0\u4e3a\u6301\u7eed\u5b66\u4e60\u7684\u4eba\u672c\u5c31\u4e0d\u591a\uff0c\u6301\u7eed\u5173\u6ce8\u524d\u6cbf\u6280\u672f\u7684\u4eba\u5c31\u66f4\u5c11\uff0c\u800c\u5173\u6ce8\u81ea\u5b9a\u4e49\u5143\u7d20\u548c\u539f\u751f\u8868\u5355\u7279\u6027\u7684\u5c31\u66f4\u5c11\uff0c\u6240\u4ee5\uff0c\u4e5f\u5c31\u6211\u8fd9\u6837\u7684\u8001\u4eba\u5bb6\u4f1a\u7814\u7a76\u5e76\u64b0\u5199\u76f8\u5173\u7684\u77e5\u8bc6\u4e86\u3002<\/p>\n<p>\u53ef\u60dc\uff0c\u73b0\u5728\u505a\u8fd9\u7c7b\u6587\u5b57\u8f93\u51fa\u7684\u6536\u76ca\u6781\u4f4e\uff0c\u56e0\u4e3a\u5927\u5bb6\u53ea\u80fd\u901a\u8fc7\u6211\u7684\u793e\u4ea4\u5a92\u4f53\u8d26\u6237\u83b7\u53d6\uff0c\u968f\u7740AI\u7684\u65e5\u76ca\u666e\u53ca\uff0c\u4f20\u7edf\u641c\u7d22\u5f15\u64ce\u6ce8\u5b9a\u6ca1\u843d\uff0c\u800cAI\u628a\u6211\u8f9b\u82e6\u5199\u7684\u5185\u5bb9\u4e00\u6293\uff0c\u7136\u540e\u81ea\u5df1\u201c\u601d\u8003\u201d\u4e00\u756a\u8f93\u51fa\u7ed9\u7528\u6237\uff0c\u6211\u4ec0\u4e48\u597d\u5904\u90fd\u5f97\u4e0d\u5230\u3002<\/p>\n<p>\u67d0\u79cd\u610f\u4e49\u4e0a\uff0cAI\u667a\u80fd\u662f\u9650\u5236\u4e86\u539f\u521b\u5185\u5bb9\u8f93\u51fa\u7684\u52a8\u529b\u7684\uff0c\u5c24\u5176\u662f\u72ec\u7acb\u5e73\u53f0\u7684\u4e2a\u4f53\u521b\u4f5c\u8005\u3002<\/p>\n<p>\u597d\u4e86\uff0c\u4e0d\u5410\u69fd\u4e86\uff0c\u56de\u5230\u6b63\u9898\uff0c\u8bb2\u4e0bHTML\u5143\u7d20\u7684\u5168\u5c40\u65b9\u6cd5<code>attachInternals()<\/code>\u65b9\u6cd5\uff0c\u6b64\u65b9\u6cd5\u7528\u5728\u81ea\u5b9a\u4e49\u5143\u7d20\u4e2d\uff0c\u4e5f\u5c31\u662f\u6211\u4eec\u5e38\u8bf4\u7684Web Components\u7ec4\u4ef6\u4e2d\uff0c\u53ef\u4ee5\u8ba9\u81ea\u5b9a\u4e49\u5143\u7d20\u5177\u6709\u539f\u751f\u8868\u5355\u5143\u7d20\u4e00\u6837\u7684\u7279\u6027\u3002<\/p>\n<p>\u6b64\u65b9\u6cd5\u7684\u4f7f\u7528\u8fd8\u662f\u633a\u7b80\u5355\u7684\uff0c\u5173\u952e\u662f\u5982\u4f55\u7406\u89e3\u5176\u8fd0\u4f5c\u539f\u7406\uff0c\u60f3\u4e86\u4e0b\uff0c\u6ca1\u6709\u901a\u8fc7\u4e00\u4e2a\u6848\u4f8b\u6765\u4ecb\u7ecd\u66f4\u76f4\u89c2\u4e86\u3002<\/p>\n<h3>\u4e00\u3001\u81ea\u5b9a\u4e49\u590d\u9009\u6846\u7ec4\u4ef6\u6848\u4f8b<\/h3>\n<p>\u6b64\u6848\u4f8b\u63cf\u8ff0\u5982\u4e0b\uff1a<\/p>\n<p>\u6709\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684\u590d\u9009\u6846\u5143\u7d20\uff0c\u901a\u8fc7<code>attachInternals()<\/code>\u65b9\u6cd5\u8ba9\u5176\u884c\u4e3a\u7c7b\u4f3c\u4e8e\u539f\u751f\u7684<code>checkbox<\/code>\u7c7b\u578b\u8f93\u5165\u6846\uff0c\u652f\u6301\u9a8c\u8bc1\u548c\u8868\u5355\u63d0\u4ea4\u3002<\/p>\n<p>\u4e0b\u9762\u8fd9\u4e2a\u6f14\u793a\u9875\u9762\u5c31\u662f\u6700\u7ec8\u5b9e\u73b0\u7684\u6548\u679c\u3002<\/p>\n<p>\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/202503\/html-attachInternals-demo.php\" rel=\"noopener\" target=\"_blank\">HTML attachInternals\u81ea\u5b9a\u4e49\u5143\u7d20\u539f\u751f\u8868\u5355\u7279\u6027demo<\/a><\/p>\n<p>\u76f8\u5173HTML\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre>&lt;form id=\"form\" action=\"\" novalidate&gt;\r\n    &lt;ui-checkbox value=\"1\" name=\"agree\" required tabindex=\"-1\"&gt;&lt;\/ui-checkbox&gt; \u540c\u610f\u534f\u8bae\r\n    &lt;p&gt;\r\n        &lt;button type=\"submit\"&gt;\u63d0\u4ea4&lt;\/button&gt;\r\n    &lt;\/p&gt;\r\n&lt;\/form&gt;<\/pre>\n<p>\u9ed8\u8ba4\u6e32\u67d3\u6548\u679c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202503\/2025-03-21_233658.png\" width=\"123\" height=\"118\" alt=\"\u8868\u5355\u6e32\u67d3\u6548\u679c\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u975e\u5e38\u6734\u5b9e\u65e0\u534e\u7684\u6837\u5f0f\u6548\u679c\uff0c\u4e0b\u9762\u5173\u952e\u6765\u4e86\uff0c\u5982\u679c\u6211\u4eec\u70b9\u51fb\u63d0\u4ea4\u6309\u94ae\uff0c\u5c31\u4f1a\u53d1\u73b0\uff0c\u8868\u5355\u5185\u7f6e\u7684\u63d0\u793a\u6548\u679c\u51fa\u73b0\u4e86\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202503\/2025-03-21_233823.png\" width=\"201\" height=\"147\" alt=\"\u63d0\u793a\u6548\u679c\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5982\u679c\u6211\u4eec\u70b9\u51fb\u590d\u9009\u6846\uff0c\u4f7f\u5176\u9009\u4e2d\uff0c\u7136\u540e\u518d\u70b9\u51fb\u63d0\u4ea4\u6309\u94ae\uff0c\u53ef\u4ee5\u770b\u5230\u81ea\u5b9a\u4e49\u7684\u8868\u5355\u6570\u636e\u5c31\u50cf\u539f\u751f\u7684\u8f93\u5165\u6846\u4e00\u6837\uff0c\u67e5\u8be2\u5b57\u7b26\u4e32\u5728URL\u5730\u5740\u4e0a\u5448\u73b0\u51fa\u6765\u4e86\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202503\/2025-03-21_234004.png\" width=\"439\" height=\"331\" alt=\"\u539f\u751f\u8868\u5355\u63d0\u4ea4\u4e00\u6837\u7684\u884c\u4e3a\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u662f\u4e0d\u662f\u8fd8\u633a\u795e\u5947\u7684\uff0c\u90a3\u5177\u4f53\u5982\u4f55\u5b9e\u73b0\u7684\u5462\uff1f<\/p>\n<h3>\u4e8c\u3001attachInternals\u65b9\u6cd5\u7684\u7528\u6cd5<\/h3>\n<p>\u5355\u770b\u8bed\u6cd5\uff0c<code>attachInternals<\/code>\u65b9\u6cd5\u4f7f\u7528\u8fd8\u662f\u633a\u7b80\u5355\u7684\uff0c\u5982\u4e0b\uff1a<\/p>\n<pre>const someInternals = someCustomElement.attachInternals() <\/pre>\n<p>\u7136\u540e\u8fd9\u4e2asomeInternals\u5bf9\u8c61\u5c31\u5305\u542b\u591a\u79cd\u539f\u751f\u8868\u5355\u5143\u7d20\u6240\u62e5\u6709\u7684\u82e5\u5e72\u5c5e\u6027\u548c\u65b9\u6cd5\uff0c\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><code>setFormValue(value: string|FormData|File, state?: any)<\/code>\uff0c\u8868\u5355\u8d4b\u503c\u7528\u7684\u3002<\/li>\n<li><code>form<\/code>\u2009\u2014\u2009\u83b7\u53d6\u6240\u5728\u7684\u8868\u5355\u5143\u7d20\u3002<\/li>\n<li><code>setValidity(flags: Partial&lt;ValidityState&gt;, message?: string, anchor?: HTMLElement)<\/code>\u2009\u2014\u2009\u8bbe\u7f6e\u9a8c\u8bc1\u63d0\u793a\u7c7b\u578b\u548c\u6587\u5b57\u4fe1\u606f\uff0c\u53ef\u4ee5\u6307\u5b9a\u951a\u5b9a\u5143\u7d20\u3002<\/li>\n<li><code>willValidate<\/code>\u2009\u2014\u2009\u8868\u5355\u63d0\u4ea4\u7684\u65f6\u5019\u5982\u679c\u4f1a\u89e6\u53d1\u9a8c\u8bc1\uff0c\u5219\u8fd4\u56de\u503c\u662f<code>true<\/code>.<\/li>\n<li><code>validity<\/code>\u2009\u2014\u2009\u9a8c\u8bc1\u72b6\u6001\uff0c\u662f\u4e2a\u5bf9\u8c61\u3002<\/li>\n<li><code>validationMessage<\/code>\u2009\u2014\u2009\u9519\u8bef\u63d0\u793a\u9a8c\u8bc1\u4fe1\u606f\u3002<\/li>\n<li><code>checkValidity<\/code>\u2009\u2014 \u68c0\u67e5\u662f\u5426\u5408\u6cd5\uff0c<\/li>\n<li><code>reportValidity<\/code>\u2009\u2014 \u51fa\u73b0\u63d0\u793a\u4fe1\u606f\uff0c\u5982\u679c\u4e0d\u5408\u6cd5\u3002<\/li>\n<li><code>labels<\/code>\u2009\u2014\u2009<code>label[for]<\/code>\u5c5e\u6027\u5173\u8054\u5143\u7d20<\/li>\n<li>\u7528\u4e8e\u5728\u5143\u7d20\u4e0a\u8bbe\u7f6earia\u4fe1\u606f\u7684\u8bb8\u591a\u5176\u4ed6\u5c5e\u6027\u6216\u65b9\u6cd5\u3002<\/li>\n<\/ul>\n<p>\u4e0a\u9762\u8fd9\u4e9b\u5c5e\u6027\u548c\u65b9\u6cd5\u7684\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u53ef\u4ee5\u53c2\u89c1\u6211\u591a\u5e74\u524d\u64b0\u5199\u7684\u8fd9\u7bc7\u6587\u7ae0\uff1a\u201c<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2019\/08\/js-checkvalidity-setcustomvalidity\/\">checkValidity\u7b49form\u539f\u751fJS\u9a8c\u8bc1\u65b9\u6cd5\u548c\u5c5e\u6027\u8be6\u7ec6\u4ecb\u7ecd<\/a>\u201d<\/p>\n<p>\u7136\u800c\uff0c\u4e8b\u60c5\u5e76\u6ca1\u6709\u4e0a\u9762\u5c55\u793a\u7684\u90a3\u4e48\u7b80\u5355\u3002<\/p>\n<p>\u9996\u5148\u7b2c\u4e00\u70b9\uff0c<code>attachInternals<\/code>\u65b9\u6cd5\u53ea\u9002\u7528\u4e8e\u81ea\u5b9a\u4e49\u5143\u7d20\uff0c\u5982\u679c\u662f\u5e38\u89c4\u5143\u7d20\uff0c\u4f1a\u62a5\u9519\uff0c\u5c31\u50cf\u4e0b\u9762\u7684\u9519\u8bef\u622a\u56fe\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202503\/2025-03-22_234926.png\" width=\"501\" height=\"117\" alt=\"\u8868\u5355\u53ea\u80fd\u81ea\u5b9a\u4e49\u5143\u7d20\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5176\u6b21\uff0c\u5728\u6784\u5efa\u81ea\u5b9a\u4e49\u5143\u7d20\u7c7b\u7684\u65f6\u5019\uff0c\u9700\u8981\u8ba9formAssociated\u8fd9\u4e2a\u9759\u6001\u5c5e\u6027\u7684\u8fd4\u56de\u503c\u662ftrue\u3002<\/p>\n<p>\u4f7f\u7528\u793a\u610f\uff1a<\/p>\n<pre>class UiCheckbox extends HTMLElement {\r\n  static get formAssociated() {\r\n    return true;\r\n  }\r\n\r\n  constructor() {\r\n    super();\r\n    this.internals = this.attachInternals();\r\n    \/\/ ...\r\n  }\r\n}\r\n\r\ncustomElements.define('ui-checkbox', UiCheckbox);<\/pre>\n<p>\u6700\u540e\uff0c\u867d\u8bf4\u4e0a\u9762\u7684\u4ee3\u7801\u5df2\u7ecf\u53ef\u4ee5\u8ba9<code>&lt;ui-checkbox&gt;<\/code>\u5143\u7d20\u901a\u8fc7\u81ea\u5b9a\u4e49\u7684<code>internals<\/code>\u5c5e\u6027\u8bbf\u95ee\u8868\u5355\u5143\u7d20\u7684\u539f\u751f\u5c5e\u6027\u548c\u65b9\u6cd5\u3002<\/p>\n<p>\u4f46\u662f\uff0c\u7c7b\u4f3c\u8868\u5355\u63d0\u4ea4\u5b57\u6bb5\u4f20\u503c\uff0c\u652f\u6301\u539f\u751fFormData\u8fd9\u4e9b\uff0c\u5e76\u4e0d\u662f\u9ed8\u8ba4\u5c31\u6709\u7684\uff0c\u6839\u636e\u6211\u7684\u5c1d\u8bd5\uff0c\u9700\u8981\u4f7f\u7528\u4e0a\u9762\u63d0\u5230\u7684<code>setFormValue()<\/code>\u65b9\u6cd5\u8d4b\u503c\u3002<\/p>\n<p>\u5305\u62ec\u9a8c\u8bc1\u63d0\u793a\u7684\u4fe1\u606f\u4e5f\u9700\u8981\u81ea\u5df1\u8fdb\u884c\u81ea\u5b9a\u4e49\u5904\u7406\u3002<\/p>\n<p>\u8fd9\u91cc\uff0c\u4e0d\u505a\u8fdb\u4e00\u6b65\u5c55\u5f00\uff0c\u5982\u4f55\u4f7f\u7528\u7684\uff0c\u8bbf\u95eedemo\u6f14\u793a\u9875\u9762\uff0c\u9875\u9762\u4e0a\u6709\u5b8c\u6574\u7684\u6e90\u4ee3\u7801\u5c55\u793a\u3002<\/p>\n<h3>\u4e09\u3001\u8bc4\u4ef7\u7efc\u8ff0<\/h3>\n<p><code>attachInternals()<\/code>\u786e\u5b9e\u6709\u5176\u4f7f\u7528\u573a\u666f\uff0c\u4f46\u662f\uff0c\u6211\u5bf9\u6b64\u65b9\u6cd5\u7684\u666e\u53ca\u4e0e\u5e94\u7528\u5e76\u4e0d\u770b\u597d\uff0c\u4e24\u4e2a\u539f\u56e0\uff1a<\/p>\n<p>\u5176\u4e00\uff0c\u5b66\u4e60\u548c\u4f7f\u7528\u95e8\u69db\u7565\u9ad8\uff0c\u9002\u5408\u559c\u6b22\u8d70\u5b8c\u5168\u81ea\u5b9a\u4e49\u8def\u7ebf\u7684\u7ec4\u4ef6\u5f00\u53d1\u8005\u3002<br \/>\n\u5176\u4e8c\uff0c\u5f53\u4e0bWeb\u6d41\u884c\u6570\u636e\u63d0\u4ea4\u6d41\uff0c\u800c\u4e0d\u662fform\u884c\u4e3a\u63d0\u4ea4\u6d41\uff0c\u5e02\u573a\u4e0d\u5e7f\u6cdb\u3002<\/p>\n<p>\u6211\u7ec6\u60f3\u4e86\u4e0b\uff0c\u8981\u662f\u6211\uff0c\u4f1a\u4f7f\u7528\u6b64\u65b9\u6cd5\u5417\uff1f<\/p>\n<p>\u6211\u662f\u4e2a\u539f\u751f\u5f00\u53d1\u63a8\u5d07\u4e4b\u4eba\uff0c\u4ee5LuLu UI\u7ec4\u4ef6\u4e3e\u4f8b\uff0c\u91cc\u9762\u6240\u6709\u7684\u63a7\u4ef6\u90fd\u662f\u57fa\u4e8e\u539f\u751f\u8868\u5355\u5143\u7d20\u5b9e\u73b0\u7684\uff0c\u5305\u62ec\u65e0\u6cd5\u8f7b\u677e\u6837\u5f0f\u81ea\u5b9a\u4e49\u7684\u4e0b\u62c9\u6846\uff0c\u6240\u4ee5\uff0c\u60f3\u4e0d\u5230\u9700\u8981\u7528\u5230<code>attachInternals()<\/code>\u7684\u573a\u666f\u3002<\/p>\n<p>\u9664\u975e\u662f\u6d4f\u89c8\u5668\u6ca1\u6709\u7684\u7ec4\u4ef6\uff0c\u800c\u8fd9\u4e2a\u7ec4\u4ef6\u540c\u65f6\u6709\u8868\u5355\u63d0\u4ea4\u6216\u8005\u9a8c\u8bc1\u7684\u9700\u6c42\uff0c\u4f8b\u5982\uff0c\u4f7f\u7528div\u6a21\u62df\u7684\u5bcc\u6587\u672c\u7f16\u8f91\u5668\u3002<\/p>\n<p>\u55ef\u2026\u2026\u518d\u770b\u5427\uff0c\u8bf4\u4e0d\u5b9a\u54ea\u5929\u6211\u5c31\u9047\u5230\u65f6\u5019\u4f7f\u7528<code>attachInternals()<\/code>\u65b9\u6cd5\u7684\u573a\u666f\uff0c\u5230\u65f6\u5019\uff0c\u6211\u518d\u6587\u4e2d\u8865\u5145\u597d\u4e86\u3002<\/p>\n<p>\u6700\u540e\uff0c\u9644\u4e0aattachInternals\u65b9\u6cd5\u7684\u517c\u5bb9\u6027\uff0c\u5982\u4e0b\u622a\u56fe\u6240\u793a\uff0c\u6240\u6709\u73b0\u4ee3\u6d4f\u89c8\u5668\u90fd\u5df2\u7ecf\u652f\u6301\u4e86\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202506\/2025-6-27_173120.png\" width=\"642\" height=\"326\" alt=\"attachInternals\u65b9\u6cd5\u517c\u5bb9\u6027\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u672c\u6587\u7684\u5168\u90e8\u5185\u5bb9\uff0c\u611f\u8c22\u9605\u8bfb\uff01<\/p>\n<p>\u4e5f\u6b22\u8fce\u5206\u4eab\uff0c\u8ba9\u66f4\u591a\u4eba\u4e86\u89e3\uff0c\u6211\u5bb6\u4f8d\u5973\u5148\u8c22\u8fc7\u8bf8\u4f4d\u4e86\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202503\/2025-03-23_000753.png\" width=\"105\" height=\"74\" alt=\"\u4f8d\u5973\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u4f1a\u7ecf\u5e38\u66f4\u65b0\u77e5\u8bc6\u70b9\u4ee5\u53ca\u4fee\u6b63\u4e00\u4e9b\u9519\u8bef\uff0c\u56e0\u6b64\u8f6c\u8f7d\u8bf7\u4fdd\u7559\u539f\u51fa\u5904\uff0c\u65b9\u4fbf\u6eaf\u6e90\uff0c\u907f\u514d\u9648\u65e7\u9519\u8bef\u77e5\u8bc6\u7684\u8bef\u5bfc\uff0c\u540c\u65f6\u6709\u66f4\u597d\u7684\u9605\u8bfb\u4f53\u9a8c\u3002<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=11570\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=11570<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202503\/attach-inter-cover.jpg\" width=\"160\" height=\"102\" alt=\"\u5c01\u9762\u5360\u4f4d\u56fe\" class=\"alignright size-medium\" loading=\"lazy\" \/><\/p>\n<p>\u5b9e\u5728\u6ca1\u60f3\u5230\uff0cWeb\u8fd8\u63d0\u4f9b\u4e86\u8fd9\u79cd\u7279\u6027\uff0c\u53ef\u4ee5\u8ba9\u4efb\u610f\u81ea\u5b9a\u4e49\u5143\u7d20\u7684\u884c\u4e3a\u53d8\u5f97\u5c31\u50cf\u539f\u751f\u7684form\u8868\u5355\u5143\u7d20\u90a3\u6837\uff0c\u6709\u70b9\u610f\u601d\u554a\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1097,1284],"tags":[2044,607,1222,1005,1223,709],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/11570"}],"collection":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/comments?post=11570"}],"version-history":[{"count":5,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/11570\/revisions"}],"predecessor-version":[{"id":11759,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/11570\/revisions\/11759"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=11570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=11570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=11570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}