{"id":10709,"date":"2023-02-08T23:48:08","date_gmt":"2023-02-08T15:48:08","guid":{"rendered":"https:\/\/www.zhangxinxu.com\/wordpress\/?p=10709"},"modified":"2023-02-21T15:41:27","modified_gmt":"2023-02-21T07:41:27","slug":"js-enter-submit-compositionupdate","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2023\/02\/js-enter-submit-compositionupdate\/","title":{"rendered":"\u5947\u4e86\u602a\u4e86\uff0c\u8f93\u5165\u6cd5\u548cJS Enter\u56de\u8f66\u63d0\u4ea4\u51b2\u7a81"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=10709\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=10709<\/a> \u946b\u7a7a\u95f4-\u946b\u751f\u6d3b<br \/>\n\u672c\u6587\u6b22\u8fce\u5206\u4eab\u4e0e\u805a\u5408\uff0c\u5168\u6587\u8f6c\u8f7d\u5c31\u4e0d\u5fc5\u4e86\uff0c\u5c0a\u91cd\u7248\u6743\uff0c\u5708\u5b50\u5c31\u8fd9\u4e48\u5927\uff0c\u82e5\u6025\u7528\u53ef\u4ee5\u8054\u7cfb\u6388\u6743\u3002<\/p>\n<p><script>window.wxShareImgUrl = 'https:\/\/www.zhangxinxu.com\/study\/image\/share\/202302-enter-key.png';<\/script><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202302\/keyboard-cover.png\" width=\"480\" height=\"301\" alt=\"\u952e\u76d8\u8f93\u5165\u5c01\u9762\u56fe\" class=\"alignright clip thumb size-medium\" \/><\/p>\n<h3>\u4e00\u3001\u95ee\u9898\u63cf\u8ff0<\/h3>\n<p>\u6700\u8fd1\u9047\u5230\u4e86\u4e2abug\uff0c\u4f7f\u7528 div \u6a21\u62df\u8f93\u5165\u6846\uff0c\u9700\u8981\u52a0\u4e0aEnter\u56de\u8f66\u952e\u5feb\u6377\u63d0\u4ea4\uff0c\u4e8e\u662f\uff0c\u6211\u5c31\u5199\u4e86\u7c7b\u4f3c\u4e0b\u9762\u7684\u4ee3\u7801\uff1a<\/p>\n<pre>&lt;div id=\"input\" placeholder=\"\u4e2d\u6587\u8f93\u5165\u6cd5\u5f00\u542f\u65f6\u5019\u56de\u8f66\" contenteditable=\"plaintext-only\"&gt;&lt;\/div&gt;<\/pre>\n<pre>input.addEventListener('keydown', function (event) {\r\n    if (event.code == 'Enter') {\r\n        event.preventDefault();\r\n\r\n        console.log('\u8868\u5355\u63d0\u4ea4\u89e6\u53d1\u4e86');\r\n    }\r\n});<\/pre>\n<p>\u7ed3\u679c\u53d1\u73b0\uff0c\u5f53\u6253\u5f00\u4e2d\u6587\u8f93\u5165\u6cd5\uff0c\u5e0c\u671b\u56de\u8f66\u786e\u8ba4\u82f1\u6587\u7684\u65f6\u5019\uff0c\u4f1a\u89e6\u53d1\u63d0\u4ea4\u884c\u4e3a\u7684\u6267\u884c\u3002<\/p>\n<p>\u5982\u4e0b\u5b9e\u9645\u6e32\u67d3\u6548\u679c\uff08iframe\u5185\u5d4c\u9875\u9762\uff09\uff1a<\/p>\n<p><iframe src=\"\/study\/202302\/div-submit.html\" style=\"height:100px;width:360px;max-width:calc(100% - 2rem);border:1px solid #ddd;\"><\/iframe><\/p>\n<p>\u5947\u4e86\u602a\u4e86\uff0c\u6211\u5f00\u53d1\u8fd9\u4e48\u591a\u5e74\uff0c\u4e4b\u524d\u4f3c\u4e4e\u6ca1\u9047\u5230\u8fd9\u4e2a\u95ee\u9898\u554a\uff0c\u600e\u4e48\u56de\u4e8b\uff1f<\/p>\n<p>\u662f\u6d4f\u89c8\u5668\u5347\u7ea7\u4e86\uff0c\u662fmacOS\u7cfb\u7edf\u539f\u56e0\uff0c\u8fd8\u662f div \u8f93\u5165\u6846\u7279\u6b8a\u884c\u4e3a\uff1f<\/p>\n<p>\u540e\u6765\u6574\u4e86\u4e2a\u6700\u539f\u59cb\u7684demo\u6d4b\u8bd5\u7814\u7a76\u4e86\u4e0b\uff0c\u627e\u5230\u4e86\u539f\u56e0\uff0c\u539f\u6765\u662f\u8fd9\u4e48\u56de\u4e8b\uff01<\/p>\n<h3>\u4e8c\u3001\u4e2d\u6587\u8f93\u5165\u6cd5\u4e0ekeyCode<\/h3>\n<p>\u4ee5\u524d\uff0c\u6211\u5904\u7406\u952e\u76d8\u884c\u4e3a\uff0c\u90fd\u662f\u7528\u7684 <code>event.keyCode<\/code>\uff0c\u65e0\u4ed6\uff0c\u5c31\u662f\u517c\u5bb9\u6027\u597d\u3002<\/p>\n<p>\u540e\u6765\u770b <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/KeyboardEvent\/keyCode\" rel=\"noopener\" target=\"_blank\">MDN \u6587\u6863<\/a>\uff0c\u8bf4 keyCode \u8981\u5e9f\u5f03\u4e86\uff0c\u4e0d\u63a8\u8350\u4f7f\u7528\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202302\/2023-02-08_225833.png\" width=\"718\" height=\"245\" alt=\"keyCode\u5e9f\u5f03\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u4e8e\u662f\u5c31\u7814\u7a76\u4e86\u4e0b\uff0c\u73b0\u5728\u90fd\u63a8\u8350\u4f7f\u7528 event.key \u6216\u8005 event.code \u6765\u5224\u65ad\u6309\u952e\u5185\u5bb9\u3002<\/p>\n<p>\u4e3a\u6b64\uff0c\u6211\u8fd8\u4e13\u95e8\u5199\u4e86\u7bc7\u6587\u7ae0\u201c<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2021\/01\/js-keycode-deprecated\/\">\u544a\u522bJS keyCode<\/a>\u201d\u3002<\/p>\n<p>\u4e8e\u662f\uff0c\u8fd9\u6b21\u7684\u9879\u76ee\uff0c\u6211\u5c31\u4f7f\u7528\u4e86 <code>event.code == 'Enter'<\/code> \u6765\u5224\u65ad\u7528\u6237\u662f\u5426\u6309\u4e0b\u4e86\u56de\u8f66\u952e\u3002<\/p>\n<p>\u672c\u8eab\u903b\u8f91\u4e0a\u6ca1\u6709\u4efb\u4f55\u95ee\u9898\uff0c\u4f46\u662f\u5b9e\u9645\u64cd\u4f5c\u5374\u4e0d\u662f\u8fd9\u4e48\u56de\u4e8b\uff0c\u53ea\u8981\u7528\u6237\u8f93\u5165\u6846\u5904\u4e8e\u805a\u7126\u72b6\u6001\uff0c\u6b64\u65f6\uff0c\u4f60\u53ea\u8981\u6309\u4e0b\u56de\u8f66\u952e\uff0c\u5c31\u4f1a\u89e6\u53d1\u76f8\u5173\u7684\u884c\u4e3a\uff0c\u54ea\u6015\u4e2d\u6587\u8f93\u5165\u6cd5\u5f00\u542f\u3002<\/p>\n<p>\u8fd9\u5c31\u5bfc\u81f4\u4e86\u56de\u8f66\u51b2\u7a81\u7684\u4ea7\u751f\uff0c\u4f46\u662f\uff0c\u4f7f\u7528 <code>event.keyCode<\/code> \u5374\u6ca1\u6709\u6b64\u95ee\u9898\uff0c\u56e0\u4e3akeyCode\u6709\u4e2a\u6211\u8fc7\u53bb\u66fe\u8bef\u8ba4\u4e3a\u5f02\u5e38\u7684\u7279\u6027\uff0c\u90a3\u5c31\u662f\u4e2d\u6587\u8f93\u5165\u6cd5\u5f00\u542f\u7684\u65f6\u5019\uff0c\u4f60\u6309\u4e0b\u4efb\u610f\u7684\u952e\uff0c\u8fd4\u56de\u7684 keyCode \u503c\u90fd\u662f229\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202101\/2021-01-03_231633.png\" width=\"476\" height=\"306\" alt=\"\u4e2d\u6587\u8f93\u5165\u6cd5\u5747\u8fd4\u56dekeyCode 229\" class=\"alignnone size-medium\"><\/p>\n<p>\u4ee5\u524d\u4ee5\u4e3a\u662f\u95ee\u9898\uff0c\u73b0\u5728\u624d\u660e\u767d\u662f\u7279\u6027\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202302\/2023-02-08_230640.png\" width=\"209\" height=\"233\" alt=\"not a bug feature\" class=\"alignnone size-medium\" \/><\/p>\n<h4>\u89e3\u51b3\u4e4b\u9053<\/h4>\n<p>\u77e5\u9053\u4e86\u539f\u56e0\uff0c\u95ee\u9898\u5c31\u597d\u89e3\u51b3\u4e86\uff0c\u4e00\u662f\u4f7f\u7528\u4f20\u7edf\u7684keyCode\u5c5e\u6027\u5224\u65ad\u597d\u4e86\uff0c\u4ec0\u4e48\u5e9f\u5f03\u4e0d\u5e9f\u5f03\u7684\uff0c\u4e0d\u7528\u8003\u8651\u90a3\u4e48\u591a\uff0c\u6d4f\u89c8\u5668\u4e0d\u4f1a\u90a3\u4e48\u50bb\uff0c\u771f\u7684\u4e0d\u652f\u6301\u8fd9\u4e2a\u5c5e\u6027\u503c\u7684\uff0c\u90a3\u4e0d\u77e5\u9053\u6709\u591a\u5c11Web\u5e94\u7528\u8981\u54ed\u7239\u558a\u5a18\u4e86\u3002<\/p>\n<pre>input.addEventListener('keydown', function (event) {\r\n    if (event.keyCode == 13) {\r\n        event.preventDefault();\r\n\r\n        console.log('\u8868\u5355\u63d0\u4ea4\u89e6\u53d1\u4e86');\r\n    }\r\n});<\/pre>\n<p>\u6b64\u65f6\uff0c\u5f53\u4e2d\u6587\u8f93\u5165\u6cd5\u5f00\u542f\uff0c\u8f93\u5165\u5185\u5bb9\u518d\u56de\u8f66\u7684\u65f6\u5019\uff0c\u7531\u4e8eevent.keyCode\u503c\u662f229\uff0c\u5c31\u4e0d\u4f1a\u6267\u884c\u8868\u5355\u63d0\u4ea4\uff0c\u800c\u662f\u5199\u5165\u4e2d\u6587\u62fc\u97f3\uff0c\u7b26\u5408\u9884\u671f\u3002<\/p>\n<p>\u8f93\u5165\u6cd5\u5173\u95ed\uff0c\u6b64\u65f6\u56de\u8f66\u7684keyCode\u503c\u662f13\uff0c\u8fdb\u5165\u4e86\u9884\u671f\u7684\u903b\u8f91\u5224\u65ad\uff0c\u6267\u884c\u8868\u5355\u63d0\u4ea4\u884c\u4e3a\uff0c\u5b8c\u7f8e\uff01<\/p>\n<h4>\u89e3\u51b3\u4e4b\u90532<\/h4>\n<p>\u4e8c\u662f\u4f7f\u7528event.key\u4ee3\u66ffevent.code\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre>input.addEventListener('keydown', function (event) {\r\n    if (event.key == 'Enter') {\r\n        event.preventDefault();\r\n\r\n        console.log('\u8868\u5355\u63d0\u4ea4\u89e6\u53d1\u4e86');\r\n    }\r\n});<\/pre>\n<p>\u56e0\u4e3a\u4e2d\u6587\u8f93\u5165\u6cd5\u5f00\u542f\u7684\u65f6\u5019\uff0c\u4efb\u4f55\u5e38\u89c4\u6309\u952e\u7684event.key\u8fd4\u56de\u503c\u90fd\u662f &#8216;Process&#8217;\uff0c\u5173\u95ed\u7684\u65f6\u5019\u624d\u4f1a\u662f &#8216;Enter&#8217;\uff0c\u4e5f\u53ef\u4ee5\u907f\u514d\u4e2d\u6587\u8f93\u5165\u6cd5\u7684\u56de\u8f66\u51b2\u7a81\u95ee\u9898\u3002<\/p>\n<h3>\u4e09\u3001compositionstart\u89e3\u51b3\u65b9\u6cd5<\/h3>\n<p>\u5982\u679c\u6709\u4eba\u975e\u8981\u8bf4\uff0c\u6211\u5c31\u662f\u559c\u6b22KeyboardEvent.code\uff0c\u975e\u4ed6\u4e0d\u5ac1\uff0c\u6211\u540c\u65f6\u8fd8\u5e0c\u671b\u8f93\u5165\u6cd5\u4e0d\u4f1a\u51fa\u6765\u641e\u4e8b\u60c5\uff0c\u6709\u6ca1\u6709\u53ef\u80fd\u65e2\u8981\u8fd8\u8981\u5462\uff1f<\/p>\n<p>\u8fd8\u662f\u53ef\u4ee5\u7684\uff0c\u53ef\u4ee5\u4f7f\u7528compositionstart\u548ccompositionend\u65f6\u95f4\u8fdb\u884c\u5904\u7406\u3002<\/p>\n<p>\u5f53\u4e2d\u6587\u8f93\u5165\u6cd5\u5f00\u542f\u7684\u65f6\u5019\uff0c\u4f1a\u89e6\u53d1compositionstart\u4e8b\u4ef6\uff0c\u5173\u95ed\u7684\u65f6\u5019\u4f1a\u89e6\u53d1compositionend\u4e8b\u4ef6\uff0c\u56e0\u6b64\uff0c\u6211\u4eec\u53ef\u4ee5\u589e\u52a0\u4e00\u4e2a\u6807\u5fd7\u91cf\uff0c\u5f53\u8f93\u5165\u6cd5\u542f\u52a8\u65f6\u5019\uff0c\u4e0d\u518d\u89e6\u53d1\u5bf9\u5e94\u7684\u884c\u4e3a\u3002<\/p>\n<p>JS\u4ee3\u7801\u793a\u610f\u5982\u4e0b\uff1a<\/p>\n<pre>var flag = true;\r\ninput.addEventListener('keydown', function (event) {\r\n    if (flag &amp;&amp; event.code == 'Enter') {\r\n        event.preventDefault();\r\n        console.log('\u8868\u5355\u63d0\u4ea4\u89e6\u53d1\u4e86');\r\n    }\r\n});\r\ninput.addEventListener('compositionstart', function (event) {\r\n    flag = false;\r\n});\r\ninput.addEventListener('compositionend', function (event) {\r\n    flag = true;\r\n});<\/pre>\n<p>\u773c\u89c1\u4e3a\u5b9e\uff0c\u4e0b\u9762\u7684\u8f93\u5165\u6846\u5c31\u662f\u4fee\u590d\u540e\u7684iframe\u5185\u5d4c\u9875\u6548\u679c\uff0c\u53ef\u4ee5\u770b\u5230\uff0c\u5f53\u8f93\u5165\u6cd5\u5f00\u542f\uff0c\u4f60\u518d\u56de\u8f66\uff0c\u662f\u4e0d\u4f1a\u89e6\u53d1\u63d0\u4ea4\u884c\u4e3a\u7684\uff1a<\/p>\n<p><iframe src=\"\/study\/202302\/div-submit-fix.html\" style=\"height:100px;width:360px;max-width:calc(100% - 2rem);border:1px solid #ddd;\"><\/iframe><\/p>\n<p><strong>\u66f4\u65b0<\/strong><\/p>\n<p>\u6839\u636e\u8bc4\u8bba\u53cd\u9988\uff0c\u76f4\u63a5\u4f7f\u7528 event.isComposing \u5224\u65ad\u5373\u53ef\uff0c\u65e0\u9700\u8fd9\u4e48\u9ebb\u70e6~<\/p>\n<h3>\u4e09\u3001\u5982\u679c\u662finput\u8f93\u5165\u6846\u7684\u89e3\u51b3\u65b9\u6cd5<\/h3>\n<p>\u5982\u679c\u8f93\u5165\u6846\u4e0d\u662fdiv\u6a21\u62df\u7684\u8f93\u5165\u6846\uff0c\u800c\u662f\u539f\u751f\u7684 input \u8f93\u5165\u6846\uff0c\u8fd8\u6709\u4e00\u79cd\u6bd4\u8f83\u597d\u7684\u89e3\u51b3\u65b9\u6cd5\uff0c\u90a3\u5c31\u662f\u8d70\u539f\u751f<code>form<\/code>\u8868\u5355\u63d0\u4ea4\uff0cJS\u4ee3\u7801\u90fd\u4e0d\u7528\u5199\uff0c\u6d4f\u89c8\u5668\u81ea\u52a8\u8bc6\u522b\u56de\u8f66\uff0c\u4e5f\u6ca1\u6709\u5404\u79cd\u4e71\u4e03\u516b\u7cdf\u7684\u5224\u65ad\u3002<\/p>\n<p>\u793a\u610f\uff1a<\/p>\n<pre>&lt;form&gt;\r\n    &lt;input required placeholder=\"\u4e2d\u6587\u8f93\u5165\u6cd5\u5f00\u542f\u65f6\u5019\u56de\u8f66\"&gt;\r\n    &lt;button type=\"submit\"&gt;\u63d0\u4ea4&lt;\/button&gt;\r\n&lt;\/form&gt;<\/pre>\n<pre>var form = document.querySelector('form');\r\nvar times = 0;\r\nform.addEventListener('submit', function (event) {\r\n    event.preventDefault();\r\n\r\n    console.log('\u8868\u5355\u63d0\u4ea4\u89e6\u53d1\u4e86' + (times ? ' +' + times: '~'));\r\n\r\n    times++;\r\n});<\/pre>\n<p>\u5b9e\u9645\u6f14\u793a\u6548\u679c\uff1a<\/p>\n<p><iframe src=\"\/study\/202302\/form-submit.html\" style=\"height:100px;width:360px;max-width:calc(100% - 2rem);border:1px solid #ddd;\"><\/iframe><\/p>\n<h3>\u56db\u3001\u7ed3\u675f\u8bf4\u70b9\u4ec0\u4e48<\/h3>\n<p>bug\u7684\u51fa\u73b0\u8fd8\u662f\u5f52\u7ed3\u4e8e\u81ea\u5df1\u5bf9\u952e\u76d8\u4e8b\u4ef6\u884c\u4e3a\u7684\u7406\u89e3\u8fd8\u4e0d\u591f\u6df1\u5165\uff0c\u8fd9\u5c31\u662f\u8981\u5728\u4e00\u7ebf\u5e72\u6d3b\u7684\u597d\u5904\uff0c\u9047\u5230\u95ee\u9898\uff0c\u4f60\u624d\u80fd\u5bf9\u6280\u80fd\u7684\u638c\u63e1\u66f4\u52a0\u6df1\u5165\u5f7b\u5e95\u3002<\/p>\n<p>\u6240\u4ee5\uff0c\u5982\u679c\u4f60\u60f3\u6210\u4e3a\u5199\u4e00\u8f88\u5b50\u4ee3\u7801\u7684\u4eba\u3002<\/p>\n<p>\u4e0d\u8981\u82b1\u592a\u591a\u7cbe\u529b\u5728\u7ba1\u7406\u4e0a\uff0c\u4f60\u4e0d\u53bb\u5199\u4ee3\u7801\uff0c\u53ea\u4e86\u89e3\u4e00\u4e9b\u8868\u9762\u7684\u4e1c\u897f\uff0c\u662f\u5199\u4e0d\u4e86\u4e00\u8f88\u5b50\u4ee3\u7801\u7684\u3002<\/p>\n<p>\u6bd5\u7adf\u77e5\u8bc6\u7684\u66f4\u65b0\u8fed\u4ee3\u901f\u5ea6\u8fd8\u662f\u5f88\u5feb\u7684\u3002<\/p>\n<p>\u597d\uff0c\u5c31\u8fd9\u4e9b\uff0c\u65e5\u5e38\u5de5\u4f5c\u5b66\u4e60\u7684\u4e00\u70b9\u8bb0\u5f55\uff0c\u5e0c\u671b\u53ef\u4ee5\u5e2e\u5230\u9047\u5230\u7c7b\u4f3c\u95ee\u9898\u7684\u540c\u5b66\u3002<\/p>\n<p>\u611f\u8c22\u9605\u8bfb\uff0c\u6b22\u8fce\u5206\u4eab\uff01<\/p>\n<p>???<\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u6b22\u8fce\u5206\u4eab\uff0c\u52ff\u5168\u6587\u8f6c\u8f7d\uff0c\u5982\u679c\u5b9e\u5728\u559c\u6b22\uff0c\u53ef\u6536\u85cf\uff0c\u6c38\u4e0d\u8fc7\u671f\uff0c\u4e14\u4f1a\u53ca\u65f6\u66f4\u65b0\u77e5\u8bc6\u70b9\u53ca\u4fee\u6b63\u9519\u8bef\uff0c\u9605\u8bfb\u4f53\u9a8c\u4e5f\u66f4\u597d\u3002<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=10709\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=10709<\/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\/202302\/keyboard-cover.png\" width=\"160\" height=\"100\" alt=\"\u952e\u76d8\u8f93\u5165\u5c01\u9762\u56fe\" class=\"alignright size-medium\" loading=\"lazy\" \/><\/p>\n<p>\u9047\u5230\u4e86\u4e2a\u5947\u602a\u7684bug\uff0c\u4ee5\u524d\u4e00\u76f4\u90fd\u6ca1\u9047\u5230\u8fc7\uff0c\u600e\u4e48\u56de\u4e8b\uff1f\u4ed4\u7ec6\u7814\u7a76\u540e\u53d1\u73b0\u4e8b\u60c5\u5e76\u4e0d\u7b80\u5355\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[180],"tags":[1899,1898,544,607,37,1697,471,1125,492],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/10709"}],"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=10709"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/10709\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=10709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=10709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=10709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}