{"id":105079,"date":"2025-04-08T16:40:35","date_gmt":"2025-04-08T08:40:35","guid":{"rendered":"https:\/\/0592ban.cn\/?p=105079"},"modified":"2025-04-08T16:40:35","modified_gmt":"2025-04-08T08:40:35","slug":"%e6%b5%8b%e8%af%95%e5%8f%8c%e5%ad%90%e5%ba%a7%e4%bb%8a%e6%97%a5%e8%bf%90%e5%8a%bf-%e6%b5%8b%e4%b8%80%e4%b8%8b%e5%8f%8c%e5%ad%90%e5%ba%a7","status":"publish","type":"post","link":"https:\/\/0592ban.cn\/index.php\/2025\/04\/08\/%e6%b5%8b%e8%af%95%e5%8f%8c%e5%ad%90%e5%ba%a7%e4%bb%8a%e6%97%a5%e8%bf%90%e5%8a%bf-%e6%b5%8b%e4%b8%80%e4%b8%8b%e5%8f%8c%e5%ad%90%e5%ba%a7\/","title":{"rendered":"\u6d4b\u8bd5\u53cc\u5b50\u5ea7\u4eca\u65e5\u8fd0\u52bf (\u6d4b\u4e00\u4e0b\u53cc\u5b50\u5ea7)"},"content":{"rendered":"<p><img decoding=\"async\" alt=\"\u6d4b\u4e00\u4e0b\u53cc\u5b50\u5ea7\" loading=\"lazy\" src=\"https:\/\/0592ban.cn\/wp-content\/uploads\/2025\/04\/2bd17c09-3087-4800-8eab-6bb56948f78d.jpeg\"\/><\/p>\n<p>\n \u4ee5\u4e0b\u662f\u9488\u5bf9\u53cc\u5b50\u5ea7\u4eca\u65e5\u8fd0\u52bf\u7684\u7b80\u77ed\u6d4b\u8bd5\uff0c\u8bf7\u6839\u636e\u4f60\u7684\u76f4\u89c9\u9009\u62e9\u6700\u9002\u5408\u4f60\u7684\u9009\u9879\u3002\n<\/p>\n<div class=\"result\">\n<div class=\"question\">\n  \u4f60\u4eca\u5929\u7684\u5fc3\u60c5\u5982\u4f55\uff1f\n <\/div>\n<div class=\"options\">\n<div class=\"option\">\n   <input id=\"option1\" name=\"q1\" type=\"radio\" value=\"\u5174\u594b\u6d3b\u529b\"\/><br \/>\n   <label for=\"option1\"><br \/>\n    \u5174\u594b\u6d3b\u529b\uff0c\u5145\u6ee1\u4e86\u79ef\u6781\u80fd\u91cf\u3002<br \/>\n   <\/label>\n  <\/div>\n<div class=\"option\">\n   <input id=\"option2\" name=\"q1\" type=\"radio\" value=\"\u8f7b\u677e\u5e73\u9759\"\/><br \/>\n   <label for=\"option2\"><br \/>\n    \u8f7b\u677e\u5e73\u9759\uff0c\u5185\u5fc3\u5e73\u548c\u5b89\u5b81\u3002<br \/>\n   <\/label>\n  <\/div>\n<div class=\"option\">\n   <input id=\"option3\" name=\"q1\" type=\"radio\" value=\"\u7126\u8651\u4e0d\u5b89\"\/><br \/>\n   <label for=\"option3\"><br \/>\n    \u7126\u8651\u4e0d\u5b89\uff0c\u611f\u5230\u538b\u529b\u91cd\u91cd\u3002<br \/>\n   <\/label>\n  <\/div>\n<div class=\"option\">\n   <input id=\"option4\" name=\"q1\" type=\"radio\" value=\"\u72b9\u8c6b\u4e0d\u51b3\"\/><br \/>\n   <label for=\"option4\"><br \/>\n    \u72b9\u8c6b\u4e0d\u51b3\uff0c\u96be\u4ee5\u505a\u51fa\u51b3\u5b9a\u3002<br \/>\n   <\/label>\n  <\/div>\n<\/p><\/div>\n<div class=\"question\">\n  \u4f60\u4eca\u5929\u6700\u60f3\u505a\u7684\u4e8b\u60c5\u662f\u4ec0\u4e48\uff1f\n <\/div>\n<div class=\"options\">\n<div class=\"option\">\n   <input id=\"option5\" name=\"q2\" type=\"radio\" value=\"\u5b66\u4e60\u65b0\u4e8b\u7269\"\/><br \/>\n   <label for=\"option5\"><br \/>\n    \u5b66\u4e60\u65b0\u4e8b\u7269\uff0c\u63a2\u7d22\u672a\u77e5\u9886\u57df\u3002<br \/>\n   <\/label>\n  <\/div>\n<div class=\"option\">\n   <input id=\"option6\" name=\"q2\" type=\"radio\" value=\"\u4eab\u53d7\u95f2\u6687\u65f6\u5149\"\/><br \/>\n   <label for=\"option6\"><br \/>\n    \u4eab\u53d7\u95f2\u6687\u65f6\u5149\uff0c\u653e\u677e\u8eab\u5fc3\u3002<br \/>\n   <\/label>\n  <\/div>\n<div class=\"option\">\n   <input id=\"option7\" name=\"q2\" type=\"radio\" value=\"\u89e3\u51b3\u95ee\u9898\"\/><br \/>\n   <label for=\"option7\"><br \/>\n    \u89e3\u51b3\u95ee\u9898\uff0c\u514b\u670d\u56f0\u96be\u3002<br \/>\n   <\/label>\n  <\/div>\n<div class=\"option\">\n   <input id=\"option8\" name=\"q2\" type=\"radio\" value=\"\u4e0e\u4eba\u4ea4\u6d41\"\/><br \/>\n   <label for=\"option8\"><br \/>\n    \u4e0e\u4eba\u4ea4\u6d41\uff0c\u6c9f\u901a\u60f3\u6cd5\u3002<br \/>\n   <\/label>\n  <\/div>\n<\/p><\/div>\n<div class=\"question\">\n  \u4f60\u4eca\u5929\u662f\u5426\u4f1a\u9047\u5230\u91cd\u8981\u7684\u4e8b\u4ef6\uff1f\n <\/div>\n<div class=\"options\">\n<div class=\"option\">\n   <input id=\"option9\" name=\"q3\" type=\"radio\" value=\"\u662f\u7684\"\/><br \/>\n   <label for=\"option9\"><br \/>\n    \u662f\u7684\uff0c\u4f1a\u6709\u91cd\u8981\u7684\u4e8b\u60c5\u53d1\u751f\u3002<br \/>\n   <\/label>\n  <\/div>\n<div class=\"option\">\n   <input id=\"option10\" name=\"q3\" type=\"radio\" value=\"\u4e0d\u662f\"\/><br \/>\n   <label for=\"option10\"><br \/>\n    \u4e0d\u662f\uff0c\u4f1a\u662f\u4e00\u4e2a\u5e73\u6de1\u7684\u4e00\u5929\u3002<br \/>\n   <\/label>\n  <\/div>\n<\/p><\/div>\n<\/div>\n<p>\u8bf7\u6ce8\u610f\uff1a \u4ee5\u4e0a\u4ee3\u7801\u53ea\u662f\u4e00\u4e2a\u6846\u67b6\u3002\u4f60\u9700\u8981\u6dfb\u52a0 JavaScript \u4ee3\u7801\u6765\u5904\u7406\u7528\u6237\u7684\u9009\u62e9\uff0c\u5e76\u6839\u636e\u9009\u62e9\u7684\u7b54\u6848\u663e\u793a\u76f8\u5e94\u7684\u8fd0\u52bf\u9884\u6d4b\u3002  \u4f60\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u51fd\u6570\u6839\u636e\u7528\u6237\u7684\u9009\u62e9\u6765\u8fd4\u56de\u76f8\u5e94\u7684\u8fd0\u52bf\u63cf\u8ff0\u3002  \u8fd9\u4e2a\u8fd0\u52bf\u63cf\u8ff0\u7684\u751f\u6210\u903b\u8f91\u9700\u8981\u4f60\u81ea\u5df1\u8bbe\u8ba1\u3002\u793a\u4f8bJavaScript\u4ee3\u7801\uff08\u9700\u7ed3\u5408HTML\u4f7f\u7528\uff09<br \/>\njavascript<br \/>\n\/\/ &#8230; (HTML\u4ee3\u7801)document.addEventListener(&#8220;DOMContentLoaded&#8221;, function() {const answerDivs = document.querySelectorAll(&#8216;.answer&#8217;);const form = document.querySelector(&#8216;.result&#8217;)\/\/ &#8230; (\u4f60\u7684\u8fd0\u52bf\u9884\u6d4b\u51fd\u6570)form.addEventListener(&#8216;change&#8217;, function() {const choices = {};const radios = this.querySelectorAll(&#8216;input[type=&#8221;radio&#8221;]:checked&#8217;);radios.forEach(radio =&gt; {choices[radio.name] = radio.value;<br \/>\n});let prediction =&#8221;;if (Object.keys(choices).length === 3) {  \/\/ \u68c0\u67e5\u662f\u5426\u9009\u5b8c\u4e86\u6240\u6709\u95ee\u9898prediction = getPrediction(choices); \/\/ \u8c03\u7528\u4f60\u7684\u8fd0\u52bf\u9884\u6d4b\u51fd\u6570}answerDivs.forEach((answer, i) =&gt;{  \/\/  \u5faa\u73af\u66f4\u65b0\u6240\u6709\u7b54\u6848answer.textContent = prediction[i];});});});function getPrediction(choices) {\/\/  \u6839\u636e\u7528\u6237\u7684\u9009\u62e9\u8fd4\u56de\u4e0d\u540c\u7684\u8fd0\u52bf\u9884\u6d4blet prediction = [];if (choices.q1 === &#8220;\u5174\u594b\u6d3b\u529b&#8221; &amp;&amp; choices.q2 === &#8220;\u5b66\u4e60\u65b0\u4e8b\u7269&#8221; &amp;&amp; choices.q3 === &#8220;\u662f\u7684&#8221;){prediction = [&#8220;\u4eca\u65e5\u8fd0\u52bf\u4e0d\u9519\uff0c\u5145\u6ee1\u6d3b\u529b\uff0c\u9002\u5408\u5b66\u4e60\u65b0\u77e5\u8bc6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u60ca\u559c\u3002&#8221;];} else if (choices.q1 === &#8220;\u8f7b\u677e\u5e73\u9759&#8221; &amp;&amp; choices.q2 === &#8220;\u4eab\u53d7\u95f2\u6687\u65f6\u5149&#8221; &amp;&amp; choices.q3 === &#8220;\u4e0d\u662f&#8221;){prediction = [&#8220;\u4eca\u65e5\u8fd0\u52bf\u5e73\u548c\uff0c\u9002\u5408\u653e\u677e\u8eab\u5fc3\uff0c\u4eab\u53d7\u5b81\u9759\u7684\u65f6\u5149\u3002&#8221;]} else if (choices.q1 === &#8220;\u7126\u8651\u4e0d\u5b89&#8221; &amp;&amp; choices.q2 === &#8220;\u89e3\u51b3\u95ee\u9898&#8221; &amp;&amp; choices.q3 === &#8220;\u662f\u7684&#8221;){prediction = [&#8220;\u4eca\u65e5\u8fd0\u52bf\u8f83\u4e3a\u7d27\u5f20\uff0c\u53ef\u80fd\u9700\u8981\u5904\u7406\u4e00\u4e9b\u95ee\u9898\uff0c\u4f46\u662f\u79ef\u6781\u5e94\u5bf9\u4e86\u4e8b\u60c5\u6709\u671b\u597d\u8f6c\u3002&#8221;]}else if (choices.q1 === &#8220;\u72b9\u8c6b\u4e0d\u51b3&#8221; &amp;&amp; choices.q2 === &#8220;\u4e0e\u4eba\u4ea4\u6d41&#8221; &amp;&amp; choices.q3 === &#8220;\u662f\u7684&#8221;){prediction = [&#8220;\u4eca\u65e5\u8fd0\u52bf\u6709\u4e9b\u6447\u6446\u4e0d\u5b9a\uff0c\u5efa\u8bae\u591a\u4e0e\u4eba\u6c9f\u901a\uff0c\u4ea4\u6d41\u60f3\u6cd5\uff0c\u4e5f\u8bb8\u80fd\u5f97\u5230\u65b0\u7684\u542f\u53d1\u3002&#8221;]}else{prediction = [&#8220;\u4f60\u7684\u9009\u62e9\u6ca1\u6709\u5bf9\u5e94\u8fd0\u52bf\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u3002&#8221;]}return prediction;<br \/>\n}\u91cd\u8981\u8bf4\u660e\uff1a  \u4e0a\u9762\u7684 JavaScript \u4ee3\u7801\u53ea\u662f\u4e00\u4e2a\u975e\u5e38\u7b80\u5355\u7684\u4f8b\u5b50\uff0c\u4f60\u9700\u8981\u6839\u636e\u4f60\u7684\u8fd0\u52bf\u9884\u6d4b\u903b\u8f91\u4fee\u6539 `getPrediction` \u51fd\u6570\u7684\u5185\u5bb9\u3002 \u5b8c\u6574\u7684\u3001\u9ad8\u8d28\u91cf\u7684\u8fd0\u52bf\u9884\u6d4b\u9700\u8981\u4e00\u4e2a\u66f4\u4e3a\u590d\u6742\u7684\u7b97\u6cd5\u548c\u66f4\u5168\u9762\u7684\u6570\u636e\uff0c\u53ef\u80fd\u9700\u8981\u4f7f\u7528\u6570\u636e\u5e93\u6216 API \u6765\u5b58\u50a8\u548c\u83b7\u53d6\u8fd0\u52bf\u4fe1\u606f\u3002  \u8fd9\u4e2a\u4f8b\u5b50\u65e8\u5728\u5c55\u793a\u5982\u4f55\u6839\u636e\u7528\u6237\u9009\u62e9\u66f4\u65b0 HTML \u5185\u5bb9\u3002  \u522b\u5fd8\u4e86\u5728\u4f60\u7684 HTML \u4e2d\u5305\u542b `<br \/>\n<script>\n ` \u6807\u7b7e\u6765\u52a0\u8f7d\u4f60\u7684 JavaScript \u4ee3\u7801\u3002\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u4e0b\u662f\u9488\u5bf9\u53cc\u5b50\u5ea7\u4eca\u65e5\u8fd0\u52bf\u7684\u7b80\u77ed\u6d4b\u8bd5\uff0c\u8bf7\u6839\u636e\u4f60\u7684\u76f4\u89c9\u9009\u62e9\u6700\u9002\u5408\u4f60\u7684\u9009\u9879\u3002\u4f60\u4eca\u5929\u7684\u5fc3\u60c5\u5982\u4f55\uff1f\u5174\u594b\u6d3b\u529b\uff0c\u5145\u6ee1\u4e86\u79ef\u6781\u80fd\u91cf\u3002\u8f7b\u677e\u5e73\u9759\uff0c\u5185\u5fc3\u5e73\u548c\u5b89\u5b81\u3002\u7126\u8651\u4e0d\u5b89\uff0c\u611f\u5230\u538b\u529b\u91cd\u91cd\u3002\u72b9\u8c6b\u4e0d\u51b3\uff0c\u96be\u4ee5\u505a\u51fa\u51b3\u5b9a\u3002\u4f60\u4eca\u5929\u6700\u60f3\u505a\u7684\u4e8b\u60c5\u662f\u4ec0\u4e48\uff1f\u5b66\u4e60\u65b0\u4e8b\u7269\uff0c\u63a2\u7d22\u672a\u77e5\u9886\u57df\u3002\u4eab\u53d7\u95f2\u6687\u65f6\u5149\uff0c\u653e\u677e\u8eab\u5fc3\u3002\u89e3\u51b3\u95ee\u9898\uff0c\u514b\u670d\u56f0\u96be\u3002\u4e0e\u4eba\u4ea4\u6d41\uff0c\u6c9f\u901a\u60f3\u6cd5\u3002\u4f60\u4eca\u5929\u662f\u5426\u4f1a\u9047\u5230\u91cd\u8981\u7684\u4e8b\u4ef6\uff1f\u662f\u7684\uff0c&#8230;<\/p>\n","protected":false},"author":1,"featured_media":105078,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[40846],"class_list":["post-105079","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-12shengxiao","tag-40846"],"_links":{"self":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/105079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/comments?post=105079"}],"version-history":[{"count":1,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/105079\/revisions"}],"predecessor-version":[{"id":105080,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/105079\/revisions\/105080"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media\/105078"}],"wp:attachment":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media?parent=105079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/categories?post=105079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/tags?post=105079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}