{"id":165887,"date":"2024-05-08T15:25:31","date_gmt":"2024-05-08T07:25:31","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/165887.html"},"modified":"2024-05-08T15:25:39","modified_gmt":"2024-05-08T07:25:39","slug":"javascript%e4%b8%ad%e6%94%b9%e5%8f%98%e5%87%bd%e6%95%b0%e7%9a%84this","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/165887.html","title":{"rendered":"JavaScript\u4e2d\u6539\u53d8\u51fd\u6570\u7684this"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26232933\/242cd127-3400-4b8b-9881-685d45105909.webp\" alt=\"JavaScript\u4e2d\u6539\u53d8\u51fd\u6570\u7684this\" \/><\/p>\n<p><p>JavaScript\u4e2d\u6539\u53d8\u51fd\u6570\u7684this\u6307\u5411\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528apply()\u3001call()\u548cbind()\u65b9\u6cd5\u5b9e\u73b0\u3002\u8fd9\u4e09\u4e2a\u65b9\u6cd5\u5747\u80fd\u591f\u7ed1\u5b9a\u51fd\u6570\u7684this\u5230\u6307\u5b9a\u7684\u5bf9\u8c61\u4e0a\uff0c\u4e0e\u4e4b\u76f8\u5173\u7684\u5dee\u5f02\u4e3b\u8981\u5728\u4e8e\u53c2\u6570\u7684\u4f20\u9012\u65b9\u5f0f\u4ee5\u53ca\u51fd\u6570\u7684\u6267\u884c\u65f6\u673a\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u4f7f\u7528call()<strong>\u65b9\u6cd5\u65f6\uff0c\u9664\u4e86\u7b2c\u4e00\u4e2a\u53c2\u6570\u7528\u4e8e\u6307\u5b9athis\u5916\uff0c\u5176\u4f59\u53c2\u6570\u5c06\u76f4\u63a5\u4f20\u9012\u7ed9\u51fd\u6570\u3002\u800c<\/strong>apply()<strong>\u5219\u662f\u5c06\u8fd9\u4e9b\u53c2\u6570\u653e\u7f6e\u4e8e\u4e00\u4e2a\u6570\u7ec4\u5185\u4f20\u9012\u3002\u800c<\/strong>bind()\u65b9\u6cd5\u5219\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u51fd\u6570\uff0c\u8fd9\u4e2a\u51fd\u6570\u7684this\u5df2\u7ecf\u88ab\u6c38\u4e45\u7ed1\u5b9a\u5230bind()\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\uff0c\u5373\u4f7f\u5728\u56de\u8c03\u51fd\u6570\u6216\u4e8b\u4ef6\u76d1\u542c\u5668\u4e2d\u88ab\u8c03\u7528\uff0c\u4e5f\u4e0d\u4f1a\u6539\u53d8this\u6307\u5411\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001CALL \u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u5728JavaScript\u4e2d\uff0ccall()\u65b9\u6cd5\u5141\u8bb8\u4e3a\u4e00\u4e2a\u51fd\u6570\u6307\u5b9athis\u7684\u503c\u548c\u5206\u522b\u63d0\u4f9b\u53c2\u6570\u3002\u8fd9\u4e2a\u65b9\u6cd5\u975e\u5e38\u6709\u7528\uff0c\u5c24\u5176\u662f\u5f53\u4f60\u5e0c\u671b\u501f\u7528\u4e00\u4e2a\u5bf9\u8c61\u7684\u65b9\u6cd5\u7ed9\u53e6\u4e00\u4e2a\u5bf9\u8c61\u4f7f\u7528\u65f6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">function greet() {<\/p>\n<p>    return &quot;Hello, &quot; + this.name;<\/p>\n<p>}<\/p>\n<p>var person = {<\/p>\n<p>    name: &quot;John&quot;<\/p>\n<p>};<\/p>\n<p>console.log(greet.call(person)); \/\/ &quot;Hello, John&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6b63\u5982\u4e0a\u9762\u7684\u4f8b\u5b50\u6240\u793a\uff0c\u901a\u8fc7\u4f7f\u7528call()\u53ef\u4ee5\u5728greet\u51fd\u6570\u4e2d\u4e3athis\u8d4b\u4e88person\u5bf9\u8c61\uff0c\u4ece\u800c\u5f97\u5230\u6b63\u786e\u7684\u95ee\u5019\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001APPLY \u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\u662fapply()\u65b9\u6cd5\uff0c\u5b83\u548ccall()\u975e\u5e38\u76f8\u4f3c\uff0c\u4f46\u662f\u5b83\u63a5\u6536\u53c2\u6570\u7684\u65b9\u5f0f\u4e0d\u540c\u3002apply()\u65b9\u6cd5\u7684\u7b2c\u4e8c\u4e2a\u53c2\u6570\u662f\u4e00\u4e2a\u6570\u7ec4\uff0c\u6570\u7ec4\u91cc\u7684\u5143\u7d20\u5c06\u4f5c\u4e3a\u5355\u72ec\u7684\u53c2\u6570\u4f20\u9012\u7ed9\u51fd\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">function introduce(job, hobby) {<\/p>\n<p>    console.log(&quot;My name is &quot; + this.name + &quot;, I&#039;m a &quot; + job + &quot; and I like &quot; + hobby + &quot;.&quot;);<\/p>\n<p>}<\/p>\n<p>var person = {<\/p>\n<p>    name: &quot;Sara&quot;<\/p>\n<p>};<\/p>\n<p>introduce.apply(person, [&quot;Developer&quot;, &quot;Cycling&quot;]); \/\/ &quot;My name is Sara, I&#039;m a Developer and I like Cycling.&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7apply(), \u6211\u4eec\u80fd\u591f\u4f20\u9012\u4e00\u4e2a\u53c2\u6570\u6570\u7ec4\uff0c\u5e76\u4e14\u5728\u8fd9\u6bb5\u4ee3\u7801\u4e2d\u4ecd\u7136\u53ef\u4ee5\u6b63\u786e\u5730\u5c06\u51fd\u6570\u5185\u90e8\u7684this\u7ed1\u5b9a\u5230person\u5bf9\u8c61\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001BIND \u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u6700\u540e\uff0cbind()\u65b9\u6cd5\u521b\u5efa\u4e00\u4e2a\u65b0\u51fd\u6570\uff0c\u5728bind()\u88ab\u8c03\u7528\u65f6\uff0c\u8fd9\u4e2a\u65b0\u51fd\u6570\u7684this\u88ab\u6307\u5b9a\u4e3abind()\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\uff0c\u5176\u4f59\u53c2\u6570\u5c06\u4f5c\u4e3a\u65b0\u51fd\u6570\u7684\u53c2\u6570\u4f9b\u8c03\u7528\u65f6\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">function saySomething(phrase) {<\/p>\n<p>    console.log(this.name + &quot; says: &quot; + phrase);<\/p>\n<p>}<\/p>\n<p>var person = {<\/p>\n<p>    name: &quot;Alex&quot;<\/p>\n<p>};<\/p>\n<p>var boundSaySomething = saySomething.bind(person);<\/p>\n<p>boundSaySomething(&quot;Hello&quot;); \/\/ &quot;Alex says: Hello&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u603b\u7ed3\u4e00\u4e0b\uff0cbind()\u521b\u5efa\u4e86\u4e00\u4e2a\u65b0\u51fd\u6570\uff0c\u5176this\u503c\u7ed1\u5b9a\u5230person\u5bf9\u8c61\u4e0a\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001THIS \u6539\u53d8\u7684\u5177\u4f53\u573a\u666f<\/h3>\n<\/p>\n<p><p>\u5728\u73b0\u5b9e\u5f00\u53d1\u4e2d\uff0c\u6539\u53d8\u51fd\u6570\u7684this\u6307\u5411\u662f\u5f88\u5e38\u89c1\u7684\uff0c\u6bd4\u5982\u5728<strong>\u56de\u8c03\u51fd\u6570\u3001\u5b9a\u65f6\u5668\u4e2d\u3001\u4ee5\u53caReact\u7ec4\u4ef6\u4e2d<\/strong>\u90fd\u53ef\u80fd\u9700\u8981\u6539\u53d8\u51fd\u6570\u7684this\u6307\u5411\u3002<\/p>\n<\/p>\n<p><h4>\u56de\u8c03\u51fd\u6570\u4e2d\u7684THIS<\/h4>\n<\/p>\n<p><p>\u5f53\u4f60\u4f20\u9012\u4e00\u4e2a\u5bf9\u8c61\u7684\u65b9\u6cd5\u4f5c\u4e3a\u56de\u8c03\u51fd\u6570\u7ed9\u67d0\u4e2a\u4e8b\u4ef6\u5904\u7406\u5668\u6216\u5f02\u6b65\u4ee3\u7801\u65f6\uff0c\u5f88\u53ef\u80fd\u4f1a\u5931\u53bb\u539f\u6765\u5bf9\u8c61\u7684this\u6307\u5411\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">var button = document.querySelector(&#039;button&#039;);<\/p>\n<p>button.addEventListener(&#039;click&#039;, person.sayHello); \/\/ this\u6307\u5411\u95ee\u9898<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u5982\u4e0a\u4ee3\u7801\u4e2d\uff0c\u5f53\u4e8b\u4ef6\u89e6\u53d1\u7684\u65f6\u5019\uff0cperson.sayHello\u51fd\u6570\u4e2d\u7684this\u5b9e\u9645\u6307\u5411\u4e86button\u5143\u7d20\uff0c\u800c\u4e0d\u662fperson\u5bf9\u8c61\u3002<\/p>\n<\/p>\n<p><h4>\u5b9a\u65f6\u5668\u4e2d\u7684THIS<\/h4>\n<\/p>\n<p><p>\u5b9a\u65f6\u5668\uff08\u5982setTimeout\u6216setInterval\uff09\u4e2d\u7684this\u901a\u5e38\u6307\u5411\u5168\u5c40\u5bf9\u8c61\u3002\u5728\u6d4f\u89c8\u5668\u4e2d\uff0c\u8fd9\u610f\u5473\u7740this\u6307\u5411window\u5bf9\u8c61\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">setTimeout(person.sayHello, 1000); \/\/ this\u6307\u5411window<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>React\u7ec4\u4ef6\u4e2d\u7684THIS<\/h4>\n<\/p>\n<p><p>\u5728React\u7ec4\u4ef6\u7684\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u4e2d\uff0c\u82e5\u4e0d\u7ed1\u5b9athis\uff0c\u5219\u9ed8\u8ba4\u4e0d\u4f1a\u6307\u5411\u5f53\u524d\u7ec4\u4ef6\u5b9e\u4f8b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-jsx\">class MyComponent extends React.Component {<\/p>\n<p>    handleClick() {<\/p>\n<p>        \/\/ &#039;this&#039;\u6307\u5411\u95ee\u9898<\/p>\n<p>    }<\/p>\n<p>    render() {<\/p>\n<p>        return &lt;button onClick={this.handleClick}&gt;Click me&lt;\/button&gt;;<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\uff0c\u4f60\u53ef\u4ee5\u5728\u76f8\u5173\u4e0a\u4e0b\u6587\u4e2d\u4f7f\u7528bind()\u65b9\u6cd5\uff0c\u6216\u8005\u4f7f\u7528\u5176\u4ed6\u66ff\u4ee3\u65b9\u6848\uff0c\u4f8b\u5982\u7bad\u5934\u51fd\u6570\uff08\u5728ES6\u4e2d\u5f15\u5165\uff09\uff0c\u5b83\u4eec\u4e0d\u7ed1\u5b9a\u81ea\u5df1\u7684this\uff0c\u800c\u662f\u7ee7\u627f\u4e0a\u4e0b\u6587\u4e2d\u7684this\u503c\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u7406\u89e3\u548c\u719f\u7ec3\u8fd0\u7528apply()\u3001call()\u3001bind()\u65b9\u6cd5\uff0c\u53ef\u4ee5\u6709\u6548\u638c\u63e1\u5e76\u8fd0\u7528JavaScript\u4e2d\u7684this\u6307\u5411\uff0c\u8fd9\u5bf9\u4e8e\u7f16\u5199\u7075\u6d3b\u4e14\u5065\u58ef\u7684\u4ee3\u7801\u81f3\u5173\u91cd\u8981\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>\u5982\u4f55\u5728JavaScript\u4e2d\u6539\u53d8\u51fd\u6570\u7684this\u6307\u5411\uff1f<\/strong><\/p>\n<ol>\n<li>\n<p>\u4f7f\u7528<code>bind()<\/code>\u65b9\u6cd5\uff1a\u53ef\u4ee5\u901a\u8fc7<code>bind()<\/code>\u65b9\u6cd5\u6765\u6c38\u4e45\u5730\u6539\u53d8\u51fd\u6570\u7684this\u6307\u5411\u3002\u4f8b\u5982\uff0c<code>functionName.bind(newThis)<\/code>\u4f1a\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u51fd\u6570\uff0c\u8be5\u51fd\u6570\u7684this\u5c06\u6c38\u4e45\u7ed1\u5b9a\u4e3anewThis\u3002\u8fd9\u6837\uff0c\u5728\u8c03\u7528\u65b0\u7684\u51fd\u6570\u65f6\uff0cthis\u5c06\u59cb\u7ec8\u6307\u5411newThis\u3002<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u7bad\u5934\u51fd\u6570\uff1a\u7bad\u5934\u51fd\u6570\u5728\u521b\u5efa\u65f6\u4f1a\u81ea\u52a8\u6355\u83b7\u5916\u90e8\u4e0a\u4e0b\u6587\u7684this\u503c\uff0c\u5e76\u5c06\u5176\u4f5c\u4e3a\u51fd\u6570\u4f53\u5185\u7684this\u503c\u3002\u56e0\u6b64\uff0c\u4f7f\u7528\u7bad\u5934\u51fd\u6570\u53ef\u4ee5\u907f\u514dthis\u6307\u5411\u7684\u95ee\u9898\u3002\u4f8b\u5982\uff0c<code>const functionName = () =&gt; { ... }<\/code>\u3002<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u6709\u54ea\u4e9b\u5e38\u7528\u7684\u65b9\u6cd5\u53ef\u4ee5\u6539\u53d8JavaScript\u51fd\u6570\u7684this\u6307\u5411\uff1f<\/strong><\/p>\n<ol>\n<li>\n<p>\u4f7f\u7528<code>call()<\/code>\u65b9\u6cd5\uff1a<code>call()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u7acb\u5373\u8c03\u7528\u51fd\u6570\uff0c\u5e76\u4e14\u53ef\u4ee5\u5c06\u6307\u5b9a\u7684\u5bf9\u8c61\u4f5c\u4e3a\u51fd\u6570\u4f53\u5185\u7684this\u503c\u3002\u4f8b\u5982\uff0c<code>functionName.call(newThis, arg1, arg2, ...)<\/code>\u3002<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528<code>apply()<\/code>\u65b9\u6cd5\uff1a<code>apply()<\/code>\u65b9\u6cd5\u4e0e<code>call()<\/code>\u65b9\u6cd5\u7c7b\u4f3c\uff0c\u4f46\u662f\u7b2c\u4e8c\u4e2a\u53c2\u6570\u9700\u8981\u4ee5\u6570\u7ec4\u5f62\u5f0f\u4f20\u9012\u3002\u4f8b\u5982\uff0c<code>functionName.apply(newThis, [arg1, arg2, ...])<\/code>\u3002<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528<code>bind()<\/code>\u65b9\u6cd5\uff1a\u4e0e\u524d\u9762\u63d0\u5230\u7684\u4e00\u6837\uff0c<code>bind()<\/code>\u65b9\u6cd5\u4e5f\u53ef\u4ee5\u7528\u4e8e\u6539\u53d8\u51fd\u6570\u7684this\u6307\u5411\u3002\u4e0d\u540c\u7684\u662f\uff0c<code>bind()<\/code>\u65b9\u6cd5\u5e76\u4e0d\u4f1a\u7acb\u5373\u8c03\u7528\u51fd\u6570\uff0c\u800c\u662f\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u51fd\u6570\uff0c\u53ef\u4ee5\u7a0d\u540e\u4f7f\u7528\u3002\u4f8b\u5982\uff0c<code>const newFunction = functionName.bind(newThis)<\/code>\u3002<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u5982\u4f55\u5728JavaScript\u4e2d\u7406\u89e3\u51fd\u6570\u7684this\u6307\u5411\uff1f<\/strong><\/p>\n<p>\u7406\u89e3\u51fd\u6570\u7684this\u6307\u5411\u662fJavaScript\u4e2d\u7684\u4e00\u4e2a\u91cd\u8981\u6982\u5ff5\u3002this\u6307\u4ee3\u7684\u662f\u5f53\u524d\u6267\u884c\u51fd\u6570\u7684\u4e0a\u4e0b\u6587\u5bf9\u8c61\uff0c\u5b83\u7684\u503c\u662f\u5728\u51fd\u6570\u88ab\u8c03\u7528\u65f6\u52a8\u6001\u786e\u5b9a\u7684\u3002\u4e0b\u9762\u662f\u4e00\u4e9b\u5173\u4e8ethis\u6307\u5411\u7684\u89e3\u91ca\uff1a<\/p>\n<ol>\n<li>\n<p>\u9ed8\u8ba4\u7ed1\u5b9a\uff1a\u5f53\u51fd\u6570\u72ec\u7acb\u5730\u88ab\u8c03\u7528\u65f6\uff0cthis\u6307\u5411\u5168\u5c40\u5bf9\u8c61\uff08\u5728\u6d4f\u89c8\u5668\u4e2d\u901a\u5e38\u662fwindow\u5bf9\u8c61\uff09\u3002\u4f8b\u5982\uff0c<code>functionName()<\/code>\uff0c\u5176\u4e2dthis\u5c06\u6307\u5411window\u3002<\/p>\n<\/li>\n<li>\n<p>\u9690\u5f0f\u7ed1\u5b9a\uff1a\u5f53\u51fd\u6570\u4f5c\u4e3a\u5bf9\u8c61\u7684\u65b9\u6cd5\u8fdb\u884c\u8c03\u7528\u65f6\uff0cthis\u6307\u5411\u8c03\u7528\u8be5\u51fd\u6570\u7684\u5bf9\u8c61\u3002\u4f8b\u5982\uff0c<code>objectName.functionName()<\/code>\uff0c\u5176\u4e2dthis\u5c06\u6307\u5411objectName\u3002<\/p>\n<\/li>\n<li>\n<p>\u663e\u5f0f\u7ed1\u5b9a\uff1a\u901a\u8fc7<code>call()<\/code>\u3001<code>apply()<\/code>\u6216<code>bind()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u660e\u786e\u5730\u6307\u5b9a\u51fd\u6570\u7684this\u503c\u3002\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u8986\u76d6\u9ed8\u8ba4\u7ed1\u5b9a\u548c\u9690\u5f0f\u7ed1\u5b9a\u3002\u4f8b\u5982\uff0c<code>functionName.call(newThis)<\/code>\uff0c\u5176\u4e2dthis\u5c06\u6307\u5411newThis\u3002<\/p>\n<\/li>\n<li>\n<p>\u7bad\u5934\u51fd\u6570\uff1a\u7bad\u5934\u51fd\u6570\u6ca1\u6709\u81ea\u5df1\u7684this\u503c\uff0c\u5b83\u4f1a\u6355\u83b7\u6700\u63a5\u8fd1\u7684\u5916\u90e8\u51fd\u6570\u7684this\u503c\uff0c\u5e76\u5c06\u5176\u7ed1\u5b9a\u4e3a\u81ea\u5df1\u7684this\u503c\u3002\u8fd9\u79cd\u7ed1\u5b9a\u662f\u9759\u6001\u7684\uff0c\u5373\u65e0\u6cd5\u6539\u53d8\u7bad\u5934\u51fd\u6570\u7684this\u6307\u5411\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u603b\u4e4b\uff0c\u7406\u89e3\u51fd\u6570\u7684this\u6307\u5411\u6709\u52a9\u4e8e\u5728JavaScript\u4e2d\u6b63\u786e\u5904\u7406\u4e0a\u4e0b\u6587\u548c\u4f5c\u7528\u57df\uff0c\u5e76\u4fdd\u8bc1\u4ee3\u7801\u7684\u9884\u671f\u884c\u4e3a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"JavaScript\u4e2d\u6539\u53d8\u51fd\u6570\u7684this\u6307\u5411\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528apply()\u3001call()\u548cbind()\u65b9\u6cd5\u5b9e\u73b0\u3002\u8fd9 [&hellip;]","protected":false},"author":3,"featured_media":165896,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/165887"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=165887"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/165887\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/165896"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=165887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=165887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=165887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}