{"id":154143,"date":"2024-05-08T11:27:14","date_gmt":"2024-05-08T03:27:14","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/154143.html"},"modified":"2024-05-08T11:27:19","modified_gmt":"2024-05-08T03:27:19","slug":"%e5%9c%a8%e7%bc%96%e5%86%99-javascript-%e4%bb%a3%e7%a0%81%e6%97%b6%ef%bc%8c%e6%9c%89%e4%bb%80%e4%b9%88%e5%b8%b8%e8%a7%81%e7%9a%84%e9%94%99%e8%af%af%e5%92%8c%e9%99%b7%e9%98%b1%e9%9c%80%e8%a6%81","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/154143.html","title":{"rendered":"\u5728\u7f16\u5199 JavaScript \u4ee3\u7801\u65f6\uff0c\u6709\u4ec0\u4e48\u5e38\u89c1\u7684\u9519\u8bef\u548c\u9677\u9631\u9700\u8981\u907f\u514d"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26212451\/20d59fce-734d-4739-b870-d40de9a1f72f.webp\" alt=\"\u5728\u7f16\u5199 JavaScript \u4ee3\u7801\u65f6\uff0c\u6709\u4ec0\u4e48\u5e38\u89c1\u7684\u9519\u8bef\u548c\u9677\u9631\u9700\u8981\u907f\u514d\" \/><\/p>\n<p><p>\u5728\u7f16\u5199 JavaScript \u4ee3\u7801\u65f6\uff0c\u5e38\u89c1\u7684\u9519\u8bef\u548c\u9677\u9631\u4e3b\u8981\u5305\u62ec<strong>\u53d8\u91cf\u63d0\u5347\u3001\u4f5c\u7528\u57df\u6df7\u6dc6\u3001\u7c7b\u578b\u8f6c\u6362\u95ee\u9898\u3001\u5168\u5c40\u53d8\u91cf\u6ee5\u7528\u3001\u5ffd\u7565\u7b49\u53f7\u4f7f\u7528\u8bef\u5dee\u3001\u95ed\u5305\u4e2d\u7684\u5185\u5b58\u6cc4\u6f0f\u3001\u5f02\u6b65\u5904\u7406\u4e0d\u5f53\u4ee5\u53ca\u6027\u80fd\u76f8\u5173\u95ee\u9898<\/strong>\u3002\u4f8b\u5982\uff0c<strong>\u7c7b\u578b\u8f6c\u6362\u95ee\u9898<\/strong>\u6307\u7684\u662fJavaScript\u5728\u8fdb\u884c\u8fd0\u7b97\u65f6\u5c06\u503c\u9690\u5f0f\u8f6c\u6362\u6210\u53ef\u6bd4\u8f83\u7684\u7c7b\u578b\u65f6\u53ef\u80fd\u4ea7\u751f\u610f\u5916\u7684\u7ed3\u679c\uff0c\u5c24\u5176\u5728\u4f7f\u7528\u53cc\u7b49\u53f7\uff08==\uff09\u8fdb\u884c\u6bd4\u8f83\u65f6\u3002\u56e0\u6b64\u5efa\u8bae\u59cb\u7ec8\u4f7f\u7528\u4e09\u4e2a\u7b49\u53f7\uff08===\uff09\u8fdb\u884c\u4e25\u683c\u6bd4\u8f83\uff0c\u4ee5\u907f\u514d\u4e0d\u540c\u7c7b\u578b\u6570\u636e\u95f4\u7684\u9690\u5f0f\u8f6c\u6362\uff0c\u786e\u4fdd\u6bd4\u8f83\u64cd\u4f5c\u7684\u51c6\u786e\u6027\u3002<\/p>\n<\/p>\n<hr>\n<p><h3>\u4e00\u3001\u53d8\u91cf\u63d0\u5347\u7684\u8bef\u533a<\/h3>\n<\/p>\n<p><p>\u53d8\u91cf\u63d0\u5347\u662f JavaScript \u4e2d\u7684\u4e00\u4e2a\u7279\u6027\uff0c\u5b83\u5141\u8bb8\u5728\u58f0\u660e\u8bed\u53e5\u4e4b\u524d\u5f15\u7528\u53d8\u91cf\u3002\u7136\u800c\uff0c\u8fd9\u53ef\u80fd\u5bfc\u81f4\u96be\u4ee5\u8c03\u8bd5\u7684\u9519\u8bef\uff0c\u5c24\u5176\u662f\u5728\u590d\u6742\u7684\u51fd\u6570\u4e2d\u3002\u8981\u907f\u514d\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u4ee5\u4f7f\u7528<code>let<\/code>\u548c<code>const<\/code>\u6765\u58f0\u660e\u53d8\u91cf\uff0c\u8fd9\u4e24\u8005\u90fd\u5177\u6709\u5757\u7ea7\u4f5c\u7528\u57df\uff0c\u53ef\u4ee5\u9650\u5236\u53d8\u91cf\u7684\u4f5c\u7528\u8303\u56f4\u3002<\/p>\n<\/p>\n<p><p>\u53d8\u91cf\u63d0\u5347\u53ef\u80fd\u5bfc\u81f4\u7a0b\u5e8f\u5458\u9884\u671f\u7684\u4ee3\u7801\u903b\u8f91\u51fa\u73b0\u504f\u5dee\uff0c\u7279\u522b\u662f\u5728\u5d4c\u5957\u51fd\u6570\u548c\u5faa\u73af\u4e2d\u3002\u521d\u59cb\u5316\u53d8\u91cf\u65f6\uff0c\u5e94\u8be5\u5728\u9002\u5f53\u7684\u4f5c\u7528\u57df\u5185\u8fdb\u884c\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u903b\u8f91\u6e05\u6670\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f5c\u7528\u57df\u6df7\u6dc6\u548c\u95ed\u5305<\/h3>\n<\/p>\n<p><p>\u5728 JavaScript \u4e2d\uff0c\u4f5c\u7528\u57df\u5b9a\u4e49\u4e86\u53d8\u91cf\u7684\u751f\u547d\u5468\u671f\u4ee5\u53ca\u5b83\u4eec\u53ef\u4ee5\u88ab\u8bbf\u95ee\u7684\u533a\u57df\u3002\u4e0d\u7406\u89e3\u51fd\u6570\u4f5c\u7528\u57df\u548c\u5168\u5c40\u4f5c\u7528\u57df\u7684\u5dee\u5f02\u4f1a\u5bfc\u81f4\u7a0b\u5e8f\u51fa\u73b0\u610f\u5916\u7684\u884c\u4e3a\u3002\u95ed\u5305\u662f\u4e00\u4e2a\u51fd\u6570\u548c\u5176\u5468\u56f4\u72b6\u6001\uff08\u8bcd\u6cd5\u73af\u5883\uff09\u7684\u7ec4\u5408\uff0c\u53ef\u4ee5\u8bbf\u95ee\u81ea\u5df1\u4f5c\u7528\u57df\u5916\u7684\u53d8\u91cf\u3002<\/p>\n<\/p>\n<p><p>\u5c3d\u7ba1\u95ed\u5305\u662f JavaScript \u4e2d\u5f3a\u5927\u7684\u7279\u6027\u4e4b\u4e00\uff0c\u4f46\u5982\u679c\u6ca1\u6709\u6b63\u786e\u7406\u89e3\u548c\u4f7f\u7528\u5b83\u4eec\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5185\u5b58\u6cc4\u6f0f\u3002\u786e\u4fdd\u53ea\u6709\u5fc5\u8981\u65f6\u624d\u521b\u5efa\u95ed\u5305\uff0c\u5e76\u6ce8\u610f\u53ca\u65f6\u91ca\u653e\u90a3\u4e9b\u4e0d\u518d\u9700\u8981\u7684\u8d44\u6e90\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u7c7b\u578b\u8f6c\u6362\u548c\u6bd4\u8f83\u9677\u9631<\/h3>\n<\/p>\n<p><p>\u5982\u524d\u6587\u6240\u8ff0\uff0c\u7c7b\u578b\u8f6c\u6362\u95ee\u9898\u662f\u975e\u5e38\u5e38\u89c1\u7684\u9677\u9631\u3002\u9664\u4e86\u4f7f\u7528\u4e09\u4e2a\u7b49\u53f7\u8fdb\u884c\u6bd4\u8f83\uff0c\u8fd8\u8981\u5c0f\u5fc3\u5904\u7406\u6570\u5b57\u3001\u5b57\u7b26\u4e32\u4ee5\u53ca\u5e03\u5c14\u503c\u4e4b\u95f4\u7684\u8f6c\u6362\u3002\u4e86\u89e3\u5982<code>NaN<\/code>\u3001<code>null<\/code>\u548c<code>undefined<\/code>\u7b49\u7279\u6b8a\u503c\u7684\u884c\u4e3a\u81f3\u5173\u91cd\u8981\u3002<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u6570\u636e\u65f6\uff0c\u663e\u5f0f\u8f6c\u6362\u901a\u5e38\u6bd4\u9690\u5f0f\u8f6c\u6362\u66f4\u4e3a\u53ef\u9760\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>Number()<\/code>\u3001<code>String()<\/code>\u7b49\u51fd\u6570\u8fdb\u884c\u663e\u5f0f\u8f6c\u6362\u53ef\u4ee5\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u6df7\u6dc6\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5168\u5c40\u53d8\u91cf\u7684\u6ee5\u7528<\/h3>\n<\/p>\n<p><p>\u5168\u5c40\u53d8\u91cf\u5728\u4efb\u4f55\u5730\u65b9\u90fd\u53ef\u4ee5\u8bbf\u95ee\uff0c\u8fd9\u4f3c\u4e4e\u5f88\u65b9\u4fbf\uff0c\u4f46\u8fc7\u591a\u7684\u5168\u5c40\u53d8\u91cf\u4f1a\u9020\u6210\u547d\u540d\u51b2\u7a81\uff0c\u5e76\u4e14\u96be\u4ee5\u8ddf\u8e2a\u53d8\u91cf\u7684\u53d8\u5316\u3002\u5e94\u8be5\u9650\u5236\u5168\u5c40\u53d8\u91cf\u7684\u4f7f\u7528\uff0c\u66f4\u591a\u5730\u91c7\u7528\u5c40\u90e8\u53d8\u91cf\uff0c\u5e76\u901a\u8fc7\u6a21\u5757\u5316\u6216\u4f7f\u7528\u7acb\u5373\u6267\u884c\u51fd\u6570\u8868\u8fbe\u5f0f\uff08IIFE\uff09\u6765\u5c01\u88c5\u53d8\u91cf\u3002<\/p>\n<\/p>\n<p><p>\u5168\u5c40\u53d8\u91cf\u7684\u53e6\u4e00\u4e2a\u98ce\u9669\u662f\u6f5c\u5728\u7684\u5185\u5b58\u6cc4\u6f0f\u3002\u7531\u4e8e\u5168\u5c40\u53d8\u91cf\u5728\u9875\u9762\u751f\u547d\u5468\u671f\u5185\u4e00\u76f4\u5b58\u5728\uff0c\u5982\u679c\u5b83\u4eec\u5f15\u7528\u5927\u91cf\u6570\u636e\u6216DOM\u5143\u7d20\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5185\u5b58\u65e0\u6cd5\u91ca\u653e\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u8bef\u7528\u7b49\u53f7\u5bfc\u81f4\u7684\u95ee\u9898<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u7c7b\u578b\u8f6c\u6362\u7684\u95ee\u9898\uff0c\u7b49\u53f7\u7684\u4f7f\u7528\u4e5f\u662f\u4e00\u4e2a\u5e38\u89c1\u7684\u9519\u8bef\u6765\u6e90\u3002\u53cc\u7b49\u53f7\uff08==\uff09\u6d89\u53ca\u7c7b\u578b\u8f6c\u6362\uff0c\u800c\u4e09\u4e2a\u7b49\u53f7\uff08===\uff09\u5219\u4e0d\u6d89\u53ca\u3002\u4f7f\u7528\u4e0d\u5f53\u4f1a\u5bfc\u81f4\u9884\u671f\u4e4b\u5916\u7684\u6bd4\u8f83\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><p>\u5728\u9012\u5f52\u6216\u6761\u4ef6\u8bed\u53e5\u4e2d\uff0c\u9519\u8bef\u5730\u4f7f\u7528\u8d4b\u503c\u8fd0\u7b97\u7b26\uff08=\uff09\u800c\u975e\u7b49\u53f7\uff08==\u6216===\uff09\u4e5f\u662f\u5e38\u89c1\u7684\u903b\u8f91\u9519\u8bef\u3002\u8fd9\u4f1a\u9020\u6210\u8d4b\u503c\u8bed\u53e5\u7684\u6267\u884c\uff0c\u800c\u4e0d\u662f\u9884\u671f\u7684\u6bd4\u8f83\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u5185\u5b58\u6cc4\u6f0f\u7684\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5185\u5b58\u6cc4\u6f0f\u662f\u6307\u5728\u9700\u8981\u65f6\u65e0\u6cd5\u56de\u6536\u5df2\u5206\u914d\u7684\u5185\u5b58\u7a7a\u95f4\u3002\u5728 JavaScript \u4e2d\uff0c\u95ed\u5305\u5982\u679c\u88ab\u4e0d\u5f53\u5904\u7406\uff0c\u7279\u522b\u662f\u5728\u5305\u542b\u5927\u91cf\u6570\u636e\u6216\u5faa\u73af\u5f15\u7528\u7684\u60c5\u51b5\u4e0b\uff0c\u5f88\u5bb9\u6613\u5bfc\u81f4\u5185\u5b58\u6cc4\u6f0f\u3002<\/p>\n<\/p>\n<p><p>\u7ba1\u7406\u548c\u76d1\u63a7\u4f60\u7684\u95ed\u5305\u4ee5\u53ca\u786e\u4fdd\u8ba1\u65f6\u5668\uff08\u5982<code>setTimeout<\/code>\u6216<code>setInterval<\/code>\uff09\u88ab\u6e05\u7406\u5e72\u51c0\u662f\u907f\u514d\u5185\u5b58\u6cc4\u6f0f\u7684\u91cd\u8981\u505a\u6cd5\u3002\u5de5\u5177\u5982Chrome\u5f00\u53d1\u8005\u5de5\u5177\u4e2d\u7684\u201c\u6027\u80fd\u201d\u6807\u7b7e\u9875\u53ef\u4ee5\u5e2e\u52a9\u68c0\u6d4b\u5185\u5b58\u6cc4\u6f0f\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u5f02\u6b65\u7f16\u7a0b\u7684\u6311\u6218<\/h3>\n<\/p>\n<p><p>JavaScript \u662f\u4e00\u95e8\u5f02\u6b65\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u7406\u89e3\u4e8b\u4ef6\u5faa\u73af\u548c\u56de\u8c03\u51fd\u6570\u673a\u5236\u5bf9\u4e8e\u7f16\u5199\u9ad8\u6548\u7684\u4ee3\u7801\u81f3\u5173\u91cd\u8981\u3002\u9519\u8bef\u7684\u56de\u8c03\u5904\u7406\u548c\u5bf9Promises\u3001async\/aw<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>t\u7b49\u73b0\u4ee3\u5f02\u6b65\u65b9\u6cd5\u7684\u8bef\u7528\u4f1a\u5bfc\u81f4\u56de\u8c03\u5730\u72f1\u6216\u672a\u6355\u83b7\u7684\u9519\u8bef\u3002<\/p>\n<\/p>\n<p><p>\u5408\u7406\u4f7f\u7528\u5f02\u6b65\u7f16\u7a0b\u7684\u6982\u5ff5\uff0c\u6bd4\u5982\u4e32\u8054\u800c\u975e\u5d4c\u5957\u56de\u8c03\uff0c\u4ee5\u53ca\u4f7f\u7528 async \u548c await \u5173\u952e\u5b57\u6765\u4f18\u5316 Promise \u7684\u5904\u7406\uff0c\u80fd\u591f\u663e\u8457\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u6027\u80fd\u4f18\u5316\u8003\u8651<\/h3>\n<\/p>\n<p><p>JavaScript \u6027\u80fd\u95ee\u9898\u901a\u5e38\u5728\u5faa\u73af\u5904\u7406\u3001\u590d\u6742\u8ba1\u7b97\u3001DOM\u64cd\u4f5c\u7b49\u65b9\u9762\u6d6e\u73b0\u3002\u6709\u6548\u5730\u5229\u7528Web APIs\uff0c\u5e76\u907f\u514d\u5728\u5173\u952e\u8def\u5f84\u4e0a\u6267\u884c\u590d\u6742\u7684\u8fd0\u7b97\u53ef\u4ee5\u6539\u8fdb\u6027\u80fd\u3002<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5927\u91cf\u6570\u636e\u65f6\uff0c\u8003\u8651\u4f7f\u7528Web Workers\u6765\u6267\u884c\u540e\u53f0\u7ebf\u7a0b\uff0c\u907f\u514d\u4e3b\u7ebf\u7a0b\u963b\u585e\u3002\u540c\u65f6, \u5bf9\u4e8eDOM\u64cd\u4f5c\uff0c\u5408\u7406\u5730\u4f7f\u7528\u6587\u6863\u7247\u6bb5\uff08DocumentFragment\uff09\u548c\u6700\u5c0f\u5316\u91cd\u6392\u91cd\u7ed8\u884c\u4e3a\uff0c\u53ef\u4ee5\u63d0\u9ad8\u9875\u9762\u7684\u6e32\u67d3\u6548\u7387\u3002<\/p>\n<\/p>\n<p><p>JavaScript \u7f16\u7801\u4e2d\u7684\u8fd9\u4e9b\u9519\u8bef\u548c\u9677\u9631\u662f\u7f16\u7a0b\u7ecf\u9a8c\u7d2f\u79ef\u7684\u4e00\u90e8\u5206\u3002\u901a\u8fc7\u5b66\u4e60\u548c\u5b9e\u8df5\uff0c\u7a0b\u5e8f\u5458\u53ef\u4ee5\u66f4\u597d\u5730\u907f\u514d\u8fd9\u4e9b\u9519\u8bef\uff0c\u5e76\u5199\u51fa\u66f4\u9ad8\u6548\u3001\u66f4\u5b89\u5168\u7684\u4ee3\u7801\u3002\u5728\u4f7f\u7528\u4efb\u4f55\u7f16\u7a0b\u8bed\u8a00\u65f6\uff0c\u4e0d\u65ad\u5730\u5b66\u4e60\u6700\u4f73\u5b9e\u8df5\u5e76\u4ed8\u8bf8\u5b9e\u8df5\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u4e3a\u4ec0\u4e48\u6211\u7684 JavaScript \u4ee3\u7801\u51fa\u73b0\u4e86\u7c7b\u578b\u9519\u8bef\uff1f<\/strong><\/p>\n<p>\u7c7b\u578b\u9519\u8bef\u662f JavaScript \u5f00\u53d1\u4e2d\u5e38\u89c1\u7684\u9519\u8bef\u4e4b\u4e00\uff0c\u5b83\u901a\u5e38\u51fa\u73b0\u5728\u53d8\u91cf\u7c7b\u578b\u7684\u4e0d\u5339\u914d\u4e0a\u3002\u8fd9\u53ef\u80fd\u662f\u56e0\u4e3a\u4f60\u5728\u4f7f\u7528\u53d8\u91cf\u4e4b\u524d\u6ca1\u6709\u6b63\u786e\u5730\u521d\u59cb\u5316\u5b83\uff0c\u6216\u8005\u4f60\u5c06\u4e0d\u517c\u5bb9\u7684\u6570\u636e\u7c7b\u578b\u8d4b\u503c\u7ed9\u53d8\u91cf\u3002\u4e3a\u4e86\u907f\u514d\u8fd9\u4e2a\u9519\u8bef\uff0c\u5efa\u8bae\u5728\u4f7f\u7528\u53d8\u91cf\u4e4b\u524d\uff0c\u59cb\u7ec8\u786e\u4fdd\u5b83\u7684\u503c\u662f\u6b63\u786e\u7684\u7c7b\u578b\uff0c\u5e76\u4e14\u5728\u8fdb\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65f6\u8981\u5c0f\u5fc3\u3002<\/p>\n<p><strong>2. \u5982\u4f55\u907f\u514d JavaScript \u4e2d\u7684\u6b7b\u5faa\u73af\uff1f<\/strong><\/p>\n<p>\u6b7b\u5faa\u73af\u662f\u6307\u5728\u4ee3\u7801\u4e2d\u65e0\u9650\u5faa\u73af\u6267\u884c\u67d0\u4e2a\u4ee3\u7801\u5757\uff0c\u5bfc\u81f4\u7a0b\u5e8f\u65e0\u6cd5\u7ec8\u6b62\u7684\u60c5\u51b5\u3002\u8981\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\uff0c\u4f60\u53ef\u4ee5\u5728\u5faa\u73af\u4e2d\u4f7f\u7528\u6761\u4ef6\u8bed\u53e5\u6765\u63a7\u5236\u5faa\u73af\u7684\u7ec8\u6b62\u6761\u4ef6\uff0c\u786e\u4fdd\u5728\u67d0\u4e2a\u6761\u4ef6\u6ee1\u8db3\u65f6\u8df3\u51fa\u5faa\u73af\u3002\u53e6\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u5728\u5faa\u73af\u4f53\u5185\u6dfb\u52a0\u5408\u9002\u7684\u63a7\u5236\u8bed\u53e5\uff0c\u4f8b\u5982 break \u8bed\u53e5\u6216 return \u8bed\u53e5\uff0c\u4ee5\u53ca\u786e\u4fdd\u5faa\u73af\u53d8\u91cf\u7684\u503c\u66f4\u65b0\u6b63\u786e\u3002<\/p>\n<p><strong>3. JavaScript \u4e2d\u5e38\u89c1\u7684\u6027\u80fd\u9677\u9631\u6709\u54ea\u4e9b\uff1f<\/strong><\/p>\n<p>\u5728\u7f16\u5199 JavaScript \u4ee3\u7801\u65f6\uff0c\u6027\u80fd\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u8003\u8651\u56e0\u7d20\u3002\u4e00\u4e9b\u5e38\u89c1\u7684\u6027\u80fd\u9677\u9631\u5305\u62ec\u9891\u7e41\u7684 DOM \u64cd\u4f5c\u3001\u7f3a\u4e4f\u5408\u9002\u7684\u4e8b\u4ef6\u5904\u7406\u548c\u5185\u5b58\u6cc4\u6f0f\u7b49\u3002\u4e3a\u4e86\u907f\u514d\u8fd9\u4e9b\u95ee\u9898\uff0c\u4f60\u53ef\u4ee5\u5c3d\u91cf\u51cf\u5c11\u5bf9 DOM \u7684\u64cd\u4f5c\u6b21\u6570\uff0c\u4f8b\u5982\u901a\u8fc7\u7f13\u5b58 DOM \u5bf9\u8c61\u6216\u4f7f\u7528\u6587\u6863\u7247\u6bb5\u6765\u51cf\u5c11\u91cd\u7ed8\u6b21\u6570\u3002\u53e6\u5916\uff0c\u53ca\u65f6\u89e3\u7ed1\u4e8b\u4ef6\u5904\u7406\u5668\uff0c\u5173\u95ed\u4e0d\u518d\u4f7f\u7528\u7684\u5b9a\u65f6\u5668\uff0c\u5e76\u4f7f\u7528\u6d4f\u89c8\u5668\u63d0\u4f9b\u7684\u5f00\u53d1\u8005\u5de5\u5177\u68c0\u6d4b\u5185\u5b58\u6cc4\u6f0f\u7b49\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728\u7f16\u5199 JavaScript \u4ee3\u7801\u65f6\uff0c\u5e38\u89c1\u7684\u9519\u8bef\u548c\u9677\u9631\u4e3b\u8981\u5305\u62ec\u53d8\u91cf\u63d0\u5347\u3001\u4f5c\u7528\u57df\u6df7\u6dc6\u3001\u7c7b\u578b\u8f6c\u6362\u95ee\u9898\u3001\u5168\u5c40\u53d8\u91cf\u6ee5\u7528 [&hellip;]","protected":false},"author":3,"featured_media":154158,"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\/154143"}],"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=154143"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/154143\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/154158"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=154143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=154143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=154143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}