{"id":91299,"date":"2024-04-09T18:25:29","date_gmt":"2024-04-09T10:25:29","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/91299.html"},"modified":"2024-04-09T18:25:30","modified_gmt":"2024-04-09T10:25:30","slug":"%e5%9c%a8javascript%e4%b8%ad%e5%ae%9e%e7%8e%b0%e9%ab%98%e6%95%88%e6%90%9c%e7%b4%a2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/91299.html","title":{"rendered":"\u5728JavaScript\u4e2d\u5b9e\u73b0\u9ad8\u6548\u641c\u7d22"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/02151138\/bc2f2ab1-e3b6-42ab-adfa-9aa68014e1da.webp\" alt=\"\u5728JavaScript\u4e2d\u5b9e\u73b0\u9ad8\u6548\u641c\u7d22\" \/><\/p>\n<p><p>\u5728JavaScript\u4e2d\u5b9e\u73b0\u9ad8\u6548\u641c\u7d22\uff0c\u5173\u952e\u5728\u4e8e<strong>\u9009\u62e9\u6b63\u786e\u7684\u6570\u636e\u7ed3\u6784\u3001\u5229\u7528\u73b0\u4ee3JavaScript\u7279\u6027\u3001\u91c7\u7528\u7b97\u6cd5\u4f18\u5316<\/strong>\u3002\u8fd9\u4e09\u4e2a\u7b56\u7565\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u641c\u7d22\u64cd\u4f5c\u7684\u6548\u7387\uff0c\u5c24\u5176\u662f\u5728\u5904\u7406\u5927\u91cf\u6570\u636e\u65f6\u66f4\u663e\u5176\u91cd\u8981\u6027\u3002\u4ee5<strong>\u9009\u62e9\u6b63\u786e\u7684\u6570\u636e\u7ed3\u6784<\/strong>\u4e3a\u4f8b\uff0c\u8fd9\u662f\u57fa\u7840\u4e14\u975e\u5e38\u5173\u952e\u7684\u4e00\u6b65\u3002\u4f7f\u7528\u9002\u5f53\u7684\u6570\u636e\u7ed3\u6784\uff0c\u6bd4\u5982\u54c8\u5e0c\u8868\uff08\u5bf9\u8c61\u6216Map\uff09\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5e38\u6570\u65f6\u95f4\u590d\u6742\u5ea6\u7684\u67e5\u627e\u64cd\u4f5c\u3002\u54c8\u5e0c\u8868\u901a\u8fc7\u952e\u503c\u5bf9\u5b58\u50a8\u6570\u636e\uff0c\u4f7f\u5f97\u5728\u6700\u4f73\u573a\u666f\u4e0b\u641c\u7d22\u64cd\u4f5c\u51e0\u4e4e\u77ac\u65f6\u5b8c\u6210\uff0c\u8fd9\u5bf9\u4e8e\u9700\u8981\u9ad8\u901f\u8bbf\u95ee\u548c\u641c\u7d22\u6570\u636e\u7684JavaScript\u5e94\u7528\u662f\u975e\u5e38\u6709\u5229\u7684\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u5229\u7528\u73b0\u4ee3JavaScript\u7279\u6027<\/h2>\n<\/p>\n<p><h3>\u7bad\u5934\u51fd\u6570\u548c\u9ad8\u9636\u51fd\u6570<\/h3>\n<\/p>\n<p><p>\u5728JavaScript\u4e2d\uff0c\u7bad\u5934\u51fd\u6570\u548c\u9ad8\u9636\u51fd\u6570\u4e0d\u4ec5\u4f7f\u4ee3\u7801\u66f4\u52a0\u7b80\u6d01\u3001\u6613\u8bfb\uff0c\u800c\u4e14\u63d0\u9ad8\u4e86\u4ee3\u7801\u7684\u6267\u884c\u6548\u7387\u3002\u4f7f\u7528\u6570\u7ec4\u7684<code>filter<\/code>\u3001<code>map<\/code>\u548c<code>reduce<\/code>\u7b49\u9ad8\u9636\u51fd\u6570\uff0c\u914d\u5408\u7bad\u5934\u51fd\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u590d\u6742\u7684\u641c\u7d22\u548c\u6570\u636e\u5904\u7406\u903b\u8f91\uff0c\u800c\u4e0d\u9700\u8981\u7f16\u5199\u5197\u957f\u7684\u5faa\u73af\u5224\u65ad\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><h3>\u5f02\u6b65\u7f16\u7a0b<\/h3>\n<\/p>\n<p><p>\u5f02\u6b65\u7f16\u7a0b\u6a21\u5f0f\uff0c\u7279\u522b\u662fPromise\u548casync\/aw<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>t\uff0c\u4e3a\u5904\u7406\u5927\u91cf\u6570\u636e\u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u641c\u7d22\u7b56\u7565\u3002\u901a\u8fc7\u5c06\u6570\u636e\u5206\u6279\u5904\u7406\uff0c\u6211\u4eec\u53ef\u4ee5\u5229\u7528JavaScript\u7684\u975e\u963b\u585e\u7279\u6027\uff0c\u5b9e\u73b0\u66f4\u52a0\u6d41\u7545\u7684\u7528\u6237\u4f53\u9a8c\u5e76\u63d0\u9ad8\u5e94\u7528\u7684\u54cd\u5e94\u901f\u5ea6\u3002<\/p>\n<\/p>\n<p><h2>\u4e8c\u3001\u9009\u62e9\u6b63\u786e\u7684\u6570\u636e\u7ed3\u6784<\/h2>\n<\/p>\n<p><h3>\u6570\u7ec4\u4e0e\u54c8\u5e0c\u8868<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u9700\u8981\u9891\u7e41\u641c\u7d22\u7684\u6570\u636e\u65f6\uff0c\u952e\u503c\u5bf9\u7684\u5b58\u50a8\u65b9\u5f0f\uff08\u5982\u5bf9\u8c61\u6216Map\uff09\u901a\u5e38\u6bd4\u6570\u7ec4\u66f4\u52a0\u9ad8\u6548\u3002\u6570\u7ec4\u9002\u5408\u4e8e\u5b58\u50a8\u6709\u5e8f\u5217\u8868\uff0c\u4f46\u5728\u641c\u7d22\u7279\u5b9a\u5143\u7d20\u65f6\u53ef\u80fd\u9700\u8981\u904d\u5386\u6574\u4e2a\u6570\u7ec4\uff0c\u8fd9\u5728\u6570\u636e\u91cf\u5927\u7684\u60c5\u51b5\u4e0b\u6548\u7387\u8f83\u4f4e\u3002\u800c\u54c8\u5e0c\u8868\u5219\u4e3a\u5e38\u6570\u65f6\u95f4\u590d\u6742\u5ea6\u7684\u641c\u7d22\u63d0\u4f9b\u4e86\u53ef\u80fd\u3002<\/p>\n<\/p>\n<p><h3>\u6811\u7ed3\u6784\u4e0e\u4e8c\u5206\u641c\u7d22<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u6709\u5e8f\u6570\u636e\u96c6\uff0c\u5229\u7528\u6811\u7ed3\u6784\uff08\u5982\u4e8c\u53c9\u641c\u7d22\u6811\u3001\u7ea2\u9ed1\u6811\uff09\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u641c\u7d22\u6548\u7387\u3002\u4e8c\u5206\u641c\u7d22\u7b97\u6cd5\u5728\u8fd9\u4e9b\u7ed3\u6784\u4e0a\u7684\u5e94\u7528\uff0c\u4f7f\u5f97\u641c\u7d22\u64cd\u4f5c\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u964d\u81f3\u5bf9\u6570\u7ea7\u522b\uff0c\u9002\u7528\u4e8e\u5927\u6570\u636e\u91cf\u7684\u641c\u7d22\u9700\u6c42\u3002<\/p>\n<\/p>\n<p><h2>\u4e09\u3001\u91c7\u7528\u7b97\u6cd5\u4f18\u5316<\/h2>\n<\/p>\n<p><h3>\u5feb\u901f\u641c\u7d22\u4e0e\u4e8c\u5206\u641c\u7d22<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u6709\u5e8f\u6570\u7ec4\uff0c\u4e8c\u5206\u641c\u7d22\u63d0\u4f9b\u4e86\u4e00\u79cd\u9ad8\u6548\u7684\u641c\u7d22\u65b9\u6cd5\uff0c\u65f6\u95f4\u590d\u6742\u5ea6\u4e3aO(log n)\u3002\u901a\u8fc7\u6301\u7eed\u5c06\u641c\u7d22\u533a\u95f4\u51cf\u534a\uff0c\u8be5\u65b9\u6cd5\u5927\u5927\u51cf\u5c11\u4e86\u9700\u8981\u6bd4\u8f83\u7684\u6570\u636e\u91cf\u3002\u800c\u5bf9\u4e8e\u65e0\u5e8f\u6570\u636e\uff0c\u5219\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u54c8\u5e0c\u8868\u6765\u5feb\u901f\u5339\u914d\u641c\u7d22\u9879\u3002<\/p>\n<\/p>\n<p><h3>\u7d22\u5f15\u6280\u672f<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5927\u6570\u636e\u96c6\u65f6\uff0c\u6784\u5efa\u7d22\u5f15\u662f\u63d0\u9ad8\u641c\u7d22\u6548\u7387\u7684\u6709\u6548\u624b\u6bb5\u3002\u901a\u8fc7\u9884\u5904\u7406\u6570\u636e\uff0c\u521b\u5efa\u4e00\u4e2a\u5feb\u901f\u8bbf\u95ee\u5173\u952e\u5b57\u7684\u7d22\u5f15\u7ed3\u6784\uff08\u5982\u5012\u6392\u7d22\u5f15\uff09\uff0c\u53ef\u4ee5\u7f29\u77ed\u641c\u7d22\u65f6\u95f4\uff0c\u5c24\u5176\u662f\u5728\u5b9e\u73b0\u6587\u672c\u641c\u7d22\u548c\u6570\u636e\u5e93\u67e5\u8be2\u7b49\u573a\u666f\u4e0b\u6781\u4e3a\u6709\u6548\u3002<\/p>\n<\/p>\n<p><h2>\u56db\u3001\u7ed3\u5408\u5b9e\u9645\u5e94\u7528\u573a\u666f\u9009\u62e9\u7b56\u7565<\/h2>\n<\/p>\n<p><h3>\u524d\u7aef\u4ea4\u4e92\u641c\u7d22<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u73b0\u524d\u7aef\u7684\u5373\u65f6\u641c\u7d22\u529f\u80fd\u65f6\uff0c\u53ef\u4ee5\u7ed3\u5408\u53bb\u6296\uff08debounce\uff09\u6280\u672f\u907f\u514d\u5bf9\u6bcf\u4e2a\u6309\u952e\u8fdb\u884c\u67e5\u8be2\uff0c\u4ece\u800c\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u6570\u636e\u5904\u7406\u548c\u7f51\u7edc\u8bf7\u6c42\uff0c\u63d0\u9ad8\u5e94\u7528\u6027\u80fd\u3002<\/p>\n<\/p>\n<p><h3>\u540e\u7aef\u6570\u636e\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5728\u670d\u52a1\u5668\u7aef\u5904\u7406\u5927\u89c4\u6a21\u6570\u636e\u641c\u7d22\u65f6\uff0c\u5229\u7528\u5e76\u884c\u5904\u7406\u6280\u672f\u548c\u4f18\u5316\u7684\u6570\u636e\u5b58\u50a8\u65b9\u6848\uff08\u5982\u4f7f\u7528NoSQL\u6570\u636e\u5e93\uff09\u80fd\u591f\u5b9e\u73b0\u5feb\u901f\u54cd\u5e94\u3002\u5e76\u884c\u5904\u7406\u53ef\u4ee5\u5145\u5206\u5229\u7528\u670d\u52a1\u5668\u7684\u591a\u6838\u4f18\u52bf\uff0c\u63d0\u9ad8\u6570\u636e\u5904\u7406\u7684\u6548\u7387\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u65b9\u6cd5\uff0c\u4e0d\u4ec5\u53ef\u4ee5<strong>\u63d0\u9ad8JavaScript\u4e2d\u641c\u7d22\u64cd\u4f5c\u7684\u6548\u7387<\/strong>\uff0c\u8fd8\u80fd\u9488\u5bf9\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u9009\u62e9\u6700\u5408\u9002\u7684\u7b56\u7565\uff0c\u4ece\u800c\u5f00\u53d1\u51fa\u66f4\u9ad8\u6548\u3001\u66f4\u5177\u54cd\u5e94\u6027\u7684JavaScript\u5e94\u7528\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>\u5982\u4f55\u5728JavaScript\u4e2d\u5b9e\u73b0\u9ad8\u6548\u7684\u641c\u7d22\u7b97\u6cd5\uff1f<\/strong><\/p>\n<p>\u641c\u7d22\u7b97\u6cd5\u5728JavaScript\u4e2d\u7684\u5b9e\u73b0\u6709\u5f88\u591a\u79cd\u65b9\u5f0f\uff0c\u4ee5\u4e0b\u662f\u51e0\u79cd\u9ad8\u6548\u7684\u65b9\u6cd5\uff1a<\/p>\n<ol>\n<li>\n<p>\u4f7f\u7528\u4e8c\u5206\u641c\u7d22\u7b97\u6cd5\uff1a\u4e8c\u5206\u641c\u7d22\u7b97\u6cd5\u662f\u4e00\u79cd\u8fc5\u901f\u67e5\u627e\u5df2\u6392\u5e8f\u6570\u7ec4\u4e2d\u7279\u5b9a\u5143\u7d20\u7684\u65b9\u6cd5\u3002\u5b83\u901a\u8fc7\u5c06\u76ee\u6807\u503c\u4e0e\u6570\u7ec4\u7684\u4e2d\u95f4\u5143\u7d20\u8fdb\u884c\u6bd4\u8f83\uff0c\u4ece\u800c\u786e\u5b9a\u76ee\u6807\u503c\u5e94\u8be5\u5728\u6570\u7ec4\u7684\u5de6\u534a\u90e8\u5206\u8fd8\u662f\u53f3\u534a\u90e8\u5206\u3002\u91cd\u590d\u8be5\u8fc7\u7a0b\uff0c\u76f4\u5230\u627e\u5230\u76ee\u6807\u503c\u4e3a\u6b62\u3002\u8fd9\u79cd\u7b97\u6cd5\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u4e3aO(log n)\uff0c\u975e\u5e38\u9ad8\u6548\u3002<\/p>\n<\/li>\n<li>\n<p>\u5012\u6392\u7d22\u5f15\uff1a\u5012\u6392\u7d22\u5f15\u662f\u4e00\u79cd\u7d22\u5f15\u6570\u636e\u7ed3\u6784\uff0c\u5b83\u5c06\u6bcf\u4e2a\u5173\u952e\u8bcd\u6620\u5c04\u5230\u5305\u542b\u8be5\u5173\u952e\u8bcd\u7684\u6587\u6863\u5217\u8868\u4e2d\u3002\u4f7f\u7528\u5012\u6392\u7d22\u5f15\uff0c\u53ef\u4ee5\u5feb\u901f\u641c\u7d22\u5305\u542b\u7279\u5b9a\u5173\u952e\u8bcd\u7684\u6587\u6863\u3002\u5728JavaScript\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u54c8\u5e0c\u8868\u6216\u6811\u6765\u5b9e\u73b0\u5012\u6392\u7d22\u5f15\uff0c\u4ee5\u63d0\u9ad8\u641c\u7d22\u7684\u6548\u7387\u3002<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528Trie\u6811\uff1aTrie\u6811\u662f\u4e00\u79cd\u7528\u4e8e\u5feb\u901f\u641c\u7d22\u5b57\u7b26\u4e32\u7684\u6570\u636e\u7ed3\u6784\u3002\u5b83\u901a\u8fc7\u5c06\u6bcf\u4e2a\u5b57\u7b26\u7684\u6240\u6709\u53ef\u80fd\u8def\u5f84\u90fd\u8868\u793a\u4e3a\u6811\u7684\u8282\u70b9\uff0c\u4ece\u800c\u5b9e\u73b0\u9ad8\u6548\u7684\u641c\u7d22\u3002\u5728JavaScript\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5bf9\u8c61\u6216Map\u6765\u5b9e\u73b0Trie\u6811\u3002<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u5982\u4f55\u5728JavaScript\u4e2d\u8fdb\u884c\u6a21\u7cca\u641c\u7d22\uff1f<\/strong><\/p>\n<p>\u5728JavaScript\u4e2d\u8fdb\u884c\u6a21\u7cca\u641c\u7d22\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u6cd5\u5b9e\u73b0\uff1a<\/p>\n<ol>\n<li>\n<p>\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u53ef\u4ee5\u5339\u914d\u6a21\u7cca\u641c\u7d22\u7684\u5173\u952e\u8bcd\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5339\u914d\u5305\u542b\u7279\u5b9a\u5b57\u7b26\u5e8f\u5217\u7684\u5b57\u7b26\u4e32\u3002\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u7684test\u65b9\u6cd5\u53ef\u4ee5\u5224\u65ad\u4e00\u4e2a\u5b57\u7b26\u4e32\u662f\u5426\u5339\u914d\u6307\u5b9a\u6a21\u5f0f\u3002<\/p>\n<\/li>\n<li>\n<p>\u5b57\u7b26\u4e32\u65b9\u6cd5\uff1aJavaScript\u63d0\u4f9b\u4e86\u4e00\u4e9b\u7528\u4e8e\u5b57\u7b26\u4e32\u5339\u914d\u548c\u641c\u7d22\u7684\u5185\u7f6e\u65b9\u6cd5\uff0c\u4f8b\u5982indexOf\u3001includes\u548cmatch\u3002\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u7528\u4e8e\u67e5\u627e\u5b57\u7b26\u4e32\u4e2d\u662f\u5426\u5305\u542b\u7279\u5b9a\u7684\u5b50\u4e32\u6216\u5173\u952e\u8bcd\u3002<\/p>\n<\/li>\n<li>\n<p>\u6a21\u7cca\u641c\u7d22\u5e93\uff1a\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u73b0\u6709\u7684JavaScript\u6a21\u7cca\u641c\u7d22\u5e93\uff0c\u5982Fuse.js\u548cFlexsearch\u3002\u8fd9\u4e9b\u5e93\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u548c\u7075\u6d3b\u7684\u914d\u7f6e\u9009\u9879\uff0c\u53ef\u6839\u636e\u9700\u6c42\u8fdb\u884c\u6a21\u7cca\u641c\u7d22\u3002<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u5982\u4f55\u5728JavaScript\u4e2d\u5b9e\u73b0\u5373\u65f6\u641c\u7d22\uff1f<\/strong><\/p>\n<p>\u5b9e\u73b0\u5373\u65f6\u641c\u7d22\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u4ee5\u4e0b\u662f\u51e0\u79cd\u5e38\u7528\u7684\u65b9\u6cd5\uff1a<\/p>\n<ol>\n<li>\n<p>\u4e8b\u4ef6\u76d1\u542c\uff1a\u4f7f\u7528JavaScript\u7684\u4e8b\u4ef6\u76d1\u542c\u673a\u5236\uff0c\u53ef\u4ee5\u5728\u7528\u6237\u6bcf\u6b21\u8f93\u5165\u65f6\u89e6\u53d1\u641c\u7d22\u51fd\u6570\u3002\u53ef\u4ee5\u4f7f\u7528input\u4e8b\u4ef6\u76d1\u542c\u8f93\u5165\u6846\u7684\u8f93\u5165\u53d8\u5316\uff0c\u6216\u4f7f\u7528keyup\u4e8b\u4ef6\u76d1\u542c\u952e\u76d8\u7684\u6309\u952e\u52a8\u4f5c\u3002<\/p>\n<\/li>\n<li>\n<p>\u5f02\u6b65\u8bf7\u6c42\uff1a\u4e3a\u4e86\u907f\u514d\u6bcf\u6b21\u8f93\u5165\u90fd\u5bf9\u670d\u52a1\u5668\u8fdb\u884c\u8bf7\u6c42\uff0c\u53ef\u4ee5\u4f7f\u7528\u5f02\u6b65\u8bf7\u6c42\u6280\u672f\u3002\u4e00\u79cd\u5e38\u89c1\u7684\u65b9\u5f0f\u662f\u4f7f\u7528Ajax\u6280\u672f\uff0c\u5c06\u7528\u6237\u8f93\u5165\u7684\u5173\u952e\u8bcd\u53d1\u9001\u5230\u670d\u52a1\u5668\uff0c\u5e76\u5728\u8fd4\u56de\u7ed3\u679c\u540e\u66f4\u65b0\u641c\u7d22\u7ed3\u679c\u3002<\/p>\n<\/li>\n<li>\n<p>\u524d\u7aef\u8fc7\u6ee4\uff1a\u5982\u679c\u641c\u7d22\u7684\u6570\u636e\u91cf\u4e0d\u662f\u5f88\u5927\uff0c\u5219\u53ef\u4ee5\u5728\u524d\u7aef\u5bf9\u6570\u636e\u8fdb\u884c\u8fc7\u6ee4\u3002\u53ef\u4ee5\u5c06\u6240\u6709\u53ef\u80fd\u7684\u641c\u7d22\u7ed3\u679c\u7f13\u5b58\u5728\u5ba2\u6237\u7aef\uff0c\u5f53\u7528\u6237\u8f93\u5165\u65f6\uff0c\u76f4\u63a5\u5728\u7f13\u5b58\u7684\u7ed3\u679c\u4e2d\u641c\u7d22\u5339\u914d\u9879\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u65e0\u8bba\u4f7f\u7528\u54ea\u79cd\u65b9\u6cd5\uff0c\u90fd\u9700\u8981\u6ce8\u610f\u7528\u6237\u4f53\u9a8c\u548c\u6027\u80fd\u3002\u4e3a\u4e86\u63d0\u9ad8\u641c\u7d22\u7684\u6548\u7387\uff0c\u53ef\u4ee5\u7ed3\u5408\u4f7f\u7528\u7f13\u5b58\u6280\u672f\u3001\u8282\u6d41\u64cd\u4f5c\u548c\u5ef6\u8fdf\u52a0\u8f7d\u7b49\u65b9\u6cd5\u6765\u4f18\u5316\u641c\u7d22\u8fc7\u7a0b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728JavaScript\u4e2d\u5b9e\u73b0\u9ad8\u6548\u641c\u7d22\uff0c\u5173\u952e\u5728\u4e8e\u9009\u62e9\u6b63\u786e\u7684\u6570\u636e\u7ed3\u6784\u3001\u5229\u7528\u73b0\u4ee3JavaScript\u7279\u6027\u3001\u91c7\u7528\u7b97\u6cd5\u4f18 [&hellip;]","protected":false},"author":3,"featured_media":91302,"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\/91299"}],"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=91299"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/91299\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/91302"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=91299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=91299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=91299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}