{"id":2082,"date":"2024-11-10T10:06:40","date_gmt":"2024-11-10T02:06:40","guid":{"rendered":"https:\/\/fwq.ai\/blog\/2082\/"},"modified":"2024-11-10T10:06:40","modified_gmt":"2024-11-10T02:06:40","slug":"%e5%a6%82%e4%bd%95%e5%b0%86%e5%89%8d%e5%8f%b0-js-%e4%ba%8c%e7%bb%b4%e6%95%b0%e7%bb%84%e4%bc%a0%e5%88%b0%e5%90%8e%e5%8f%b0-c%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/2082\/","title":{"rendered":"\u5982\u4f55\u5c06\u524d\u53f0 JS \u4e8c\u7ef4\u6570\u7ec4\u4f20\u5230\u540e\u53f0 C#\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173063870113590.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5c06\u524d\u53f0 JS \u4e8c\u7ef4\u6570\u7ec4\u4f20\u5230\u540e\u53f0 C#\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5c06\u524d\u53f0 JS \u4e8c\u7ef4\u6570\u7ec4\u4f20\u5230\u540e\u53f0 C#\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u524d\u53f0 JS \u4e8c\u7ef4\u6570\u7ec4\u63a5\u6536\u963b\u788d\u89e3\u60d1<\/strong><\/p>\n<p>\u4f60\u662f\u5426\u66fe\u9047\u5230\u8fc7\u5c06\u524d\u53f0 JS \u4e8c\u7ef4\u6570\u7ec4\u4f20\u9012\u81f3\u540e\u53f0 C# \u7684\u96be\u9898\uff1f\u6211\u4eec\u7406\u89e3\u4f60\u7684\u56f0\u60d1\uff0c\u5e76\u5c06\u5728\u6b64\u89e3\u7b54\u4f60\u7684\u7591\u95ee\u3002<\/p>\n<p><strong>\u95ee\u9898\u89e3\u7b54\uff1a<\/strong><\/p>\n<p>\u4f60\u7684\u95ee\u9898\u4e3b\u8981\u6e90\u4e8e\u5bf9\u6570\u636e\u683c\u5f0f\u548c\u901a\u4fe1\u65b9\u5f0f\u7684 misunderstanding\u3002\u4e3a\u4e86\u89e3\u51b3\u8be5\u95ee\u9898\uff0c\u6211\u4eec\u9700\u8981\u5206\u6b65\u5206\u89e3\uff1a<\/p>\n<p><strong>1. \u6570\u636e\u683c\u5f0f<\/strong><\/p>\n<p>\u524d\u53f0 JS \u8f93\u51fa\u7684\u6570\u636e\u683c\u5f0f\u4e3a JSON \u6570\u7ec4\uff0c\u800c\u540e\u53f0 C# \u63a5\u6536\u7684\u6570\u636e\u7c7b\u578b\u5e94\u4e3a\u4e8c\u7ef4 int \u6570\u7ec4\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u9700\u8981\u5728\u4e2d\u95f4\u8f6c\u6362\u6570\u636e\u683c\u5f0f\u3002<\/p>\n<p><strong>2. \u901a\u4fe1\u65b9\u5f0f<\/strong><\/p>\n<p>\u6570\u636e\u4f20\u8f93\u901a\u5e38\u901a\u8fc7 HTTP \u8bf7\u6c42\u5b8c\u6210\uff0c\u53ef\u4ee5\u901a\u8fc7 Ajax \u5e93\u53d1\u9001\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0cJS \u4e2d Lists \u7684\u503c\u5e94\u7b26\u5408\u540e\u53f0 C# \u7684\u6570\u636e\u6a21\u578b\u3002<\/p>\n<p><strong>\u5177\u4f53\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n<ol>\n<li>\u5728\u524d\u7aef\u6536\u96c6\u4e8c\u7ef4\u6570\u7ec4\u6570\u636e\u5e76\u8f6c\u5316\u4e3a\u7b26\u5408 C# \u6570\u636e\u6a21\u578b\u7684 JSON \u683c\u5f0f\u3002<\/li>\n<li>\u4f7f\u7528 Ajax \u5e93\u5411\u540e\u53f0\u53d1\u9001\u6570\u636e\uff0c\u5e76\u6307\u5b9a\u8bf7\u6c42\u7c7b\u578b\u4e3a POST\u3002<\/li>\n<li>\u5728\u540e\u53f0 C# \u4e2d\uff0c\u4f7f\u7528\u5408\u9002\u7684\u7ed1\u5b9a\u6a21\u578b\u63a5\u6536\u6570\u636e\uff0c\u5e76\u5c06\u5176\u8f6c\u5316\u4e3a\u4e8c\u7ef4 int \u6570\u7ec4\u3002<\/li>\n<\/ol>\n<p>\u901a\u8fc7\u9075\u5faa\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u6210\u529f\u5730\u5728 JS \u548c C# \u4e4b\u95f4\u4f20\u9012\u4e8c\u7ef4\u6570\u7ec4\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5c06\u524d\u53f0 JS \u4e8c\u7ef4\u6570\u7ec4\u4f20\u5230\u540e\u53f0 C#\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u53f0 JS \u4e8c\u7ef4\u6570\u7ec4\u63a5\u6536\u963b\u788d\u89e3\u60d1 \u4f60\u662f\u5426\u66fe\u9047\u5230\u8fc7\u5c06\u524d\u53f0 JS \u4e8c\u7ef4\u6570\u7ec4\u4f20\u9012\u81f3\u540e\u53f0 C# \u7684\u96be\u9898\uff1f\u6211\u4eec\u7406\u89e3\u4f60\u7684\u56f0\u60d1\uff0c\u5e76\u5c06\u5728\u6b64\u89e3\u7b54\u4f60\u7684\u7591\u95ee\u3002 \u95ee\u9898\u89e3\u7b54\uff1a \u4f60\u7684\u95ee\u9898\u4e3b\u8981\u6e90\u4e8e\u5bf9\u6570\u636e\u683c\u5f0f\u548c\u901a\u4fe1\u65b9\u5f0f\u7684 misunderstanding\u3002\u4e3a\u4e86\u89e3\u51b3\u8be5\u95ee\u9898\uff0c\u6211\u4eec\u9700\u8981\u5206\u6b65\u5206\u89e3\uff1a 1. \u6570\u636e\u683c\u5f0f \u524d\u53f0 JS \u8f93\u51fa\u7684\u6570\u636e\u683c\u5f0f\u4e3a JSON \u6570\u7ec4\uff0c\u800c\u540e\u53f0 C# \u63a5\u6536\u7684\u6570\u636e\u7c7b\u578b\u5e94\u4e3a\u4e8c\u7ef4 int \u6570\u7ec4\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u9700\u8981\u5728\u4e2d\u95f4\u8f6c\u6362\u6570\u636e\u683c\u5f0f\u3002 2. \u901a\u4fe1\u65b9\u5f0f \u6570\u636e\u4f20\u8f93\u901a\u5e38\u901a\u8fc7 HTTP \u8bf7\u6c42\u5b8c\u6210\uff0c\u53ef\u4ee5\u901a\u8fc7 Ajax \u5e93\u53d1\u9001\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0cJS \u4e2d Lists \u7684\u503c\u5e94\u7b26\u5408\u540e\u53f0 C# \u7684\u6570\u636e\u6a21\u578b\u3002 \u5177\u4f53\u89e3\u51b3\u65b9\u6848\uff1a \u5728\u524d\u7aef\u6536\u96c6\u4e8c\u7ef4\u6570\u7ec4\u6570\u636e\u5e76\u8f6c\u5316\u4e3a\u7b26\u5408 C# \u6570\u636e\u6a21\u578b\u7684 JSON \u683c\u5f0f\u3002 \u4f7f\u7528 Ajax \u5e93\u5411\u540e\u53f0\u53d1\u9001\u6570\u636e\uff0c\u5e76\u6307\u5b9a\u8bf7\u6c42\u7c7b\u578b\u4e3a POST\u3002 \u5728\u540e\u53f0 C# \u4e2d\uff0c\u4f7f\u7528\u5408\u9002\u7684\u7ed1\u5b9a\u6a21\u578b\u63a5\u6536\u6570\u636e\uff0c\u5e76\u5c06\u5176\u8f6c\u5316\u4e3a\u4e8c\u7ef4 int \u6570\u7ec4\u3002 \u901a\u8fc7\u9075\u5faa\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u6210\u529f\u5730\u5728 JS \u548c C# \u4e4b\u95f4\u4f20\u9012\u4e8c\u7ef4\u6570\u7ec4\u3002 \u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5c06\u524d\u53f0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-2082","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/2082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=2082"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/2082\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=2082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=2082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=2082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}