{"id":2764,"date":"2024-05-31T03:03:32","date_gmt":"2024-05-30T19:03:32","guid":{"rendered":"https:\/\/0592ban.cn\/?p=2764"},"modified":"2024-05-31T03:03:32","modified_gmt":"2024-05-30T19:03:32","slug":"%e8%bf%bd%e6%ba%af%e5%a4%8d%e5%8f%a4%e6%97%b6%e9%97%b4%e7%9a%84%e6%a0%87%e5%bf%97%e6%80%a7%e6%97%b6%e8%ae%a1-1990-%e5%b9%b4%e6%98%9f%e5%ba%a7%e8%a1%a8-%e8%bf%bd%e6%ba%af%e5%a4%8d%e5%8f%a4%e6%97%b6","status":"publish","type":"post","link":"https:\/\/0592ban.cn\/index.php\/2024\/05\/31\/%e8%bf%bd%e6%ba%af%e5%a4%8d%e5%8f%a4%e6%97%b6%e9%97%b4%e7%9a%84%e6%a0%87%e5%bf%97%e6%80%a7%e6%97%b6%e8%ae%a1-1990-%e5%b9%b4%e6%98%9f%e5%ba%a7%e8%a1%a8-%e8%bf%bd%e6%ba%af%e5%a4%8d%e5%8f%a4%e6%97%b6\/","title":{"rendered":"\u8ffd\u6eaf\u590d\u53e4\u65f6\u95f4\u7684\u6807\u5fd7\u6027\u65f6\u8ba1 1990 \u5e74\u661f\u5ea7\u8868 (\u8ffd\u6eaf\u590d\u53e4\u65f6\u95f4\u7684\u7535\u5f71)"},"content":{"rendered":"<p><img decoding=\"async\" alt=\"\u8ffd\u6eaf\u590d\u53e4\u65f6\u95f4\u7684\u7535\u5f71\" loading=\"lazy\" src=\"https:\/\/0592ban.cn\/wp-content\/uploads\/2024\/05\/ed8332f3-f620-44a5-884e-1d7a934e30a0.jpg\"\/><\/p>\n<p>\n \u60f3\u77e5\u9053\u81ea\u5df1\u7684\u661f\u5ea7\u5417\uff1f\u8f93\u5165\u51fa\u751f\u65e5\u671f\uff0c\u5373\u53ef\u83b7\u53d6\u661f\u5ea7\u4fe1\u606f\uff1a\n<\/p>\n<form>\n <label for=\"birth-date\"><br \/>\n  \u51fa\u751f\u65e5\u671f\uff1a<br \/>\n <\/label><br \/>\n <input id=\"birth-date\" type=\"date\"\/><br \/>\n <input type=\"submit\" value=\"\u67e5\u8be2\"\/><br \/>\n<\/form>\n<p><\/p>\n<div id=\"result\">\n <!-- \u7ed3\u679c\u5c06\u663e\u793a\u5728\u8fd9\u91cc -->\n<\/div>\n<p><script>\n \/\/ \u83b7\u53d6\u8f93\u5165\u7684\u51fa\u751f\u65e5\u671f\n  const birthDateInput = document.getElementById('birth-date');<\/p>\n<p>  \/\/ \u521b\u5efa\u4e00\u4e2a\u51fd\u6570\u6765\u5904\u7406\u8868\u5355\u63d0\u4ea4\n  const handleFormSubmit = (event) => {\n    event.preventDefault();<\/p>\n<p>    \/\/ \u83b7\u53d6\u51fa\u751f\u65e5\u671f\n    const birthDate = new Date(birthDateInput.value);<\/p>\n<p>    \/\/ \u6839\u636e\u51fa\u751f\u65e5\u671f\u8ba1\u7b97\u661f\u5ea7\n    let zodiacSign;\n    const month = birthDate.getMonth() +1;\n    const day = birthDate.getDate();<\/p>\n<p>    if (month === 3 && day >= 21 && day <= 31) {\n      zodiacSign = '\u767d\u7f8a\u5ea7';\n    } else if (month === 4 &#038;&#038; day >= 20 && day <= 30) {\n      zodiacSign = '\u91d1\u725b\u5ea7';\n    } else if (month === 5 &#038;&#038; day >= 21 && day <= 31) {\n      zodiacSign = '\u53cc\u5b50\u5ea7';\n    } else if (month === 6 &#038;&#038; day >= 21 && day <= 30) {\n      zodiacSign = '\u5de8\u87f9\u5ea7';\n    } else if (month === 7 &#038;&#038; day >= 23 && day <= 31) {\n      zodiacSign = '\u72ee\u5b50\u5ea7';\n    } else if (month === 8 &#038;&#038; day >= 23 && day <= 31) {\n      zodiacSign = '\u5904\u5973\u5ea7';\n    } else if (month === 9 &#038;&#038; day >= 23 && day <= 30) {\n      zodiacSign = '\u5929\u79e4\u5ea7';\n    } elseif (month === 10 &#038;&#038; day >= 23 && day <= 31) {\n      zodiacSign = '\u5929\u874e\u5ea7';\n    } else if (month === 11 &#038;&#038; day >= 22 && day <= 30) {\n      zodiacSign = '\u5c04\u624b\u5ea7';\n    } else if (month === 12 &#038;&#038; day >= 22 && day <= 31) {\n      zodiacSign = '\u6469\u7faf\u5ea7';\n    } else if (month === 1 &#038;&#038; day >= 20 && day <= 31) {\n      zodiacSign = '\u6c34\u74f6\u5ea7';\n    } else if (month === 2 &#038;&#038; day >= 19 && day <= 29) {\n      zodiacSign = '\u53cc\u9c7c\u5ea7';\n    }\n\n    \/\/ \u663e\u793a\u661f\u5ea7\u4fe1\u606f\n    const resultDiv = document.getElementById('result');\n    resultDiv.innerHTML = `\u4f60\u7684\u661f\u5ea7\u662f\uff1a${zodiacSign}`;\n  };\n\n  \/\/ \u6dfb\u52a0\u76d1\u542c\u5668\u4ee5\u5904\u7406\u8868\u5355\u63d0\u4ea4\n  const form = document.querySelector('form');\n  form.addEventListener('submit', handleFormSubmit);\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u60f3\u77e5\u9053\u81ea\u5df1\u7684\u661f\u5ea7\u5417\uff0c\u8f93\u5165\u51fa\u751f\u65e5\u671f\uff0c\u5373\u53ef\u83b7\u53d6\u661f\u5ea7\u4fe1\u606f\uff0c\u51fa\u751f\u65e5\u671f\uff0c\u83b7\u53d6\u8f93\u5165\u7684\u51fa\u751f\u65e5\u671fconstbirthDateInput=document.getElementById\uff0cbirth\uff0cdate\uff0c\u521b\u5efa\u4e00\u4e2a\u51fd\u6570\u6765\u5904\u7406\u8868\u5355\u63d0\u4ea4consthandleFormSubmit=\uff0cevent\uff0c=\uff0cevent.preventDefault\uff0c&#8230;\u3002<\/p>\n","protected":false},"author":1,"featured_media":2763,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[13,1637,1636],"class_list":["post-2764","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-12shengxiao","tag-13","tag-1637","tag-1636"],"_links":{"self":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/2764","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=2764"}],"version-history":[{"count":1,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/2764\/revisions"}],"predecessor-version":[{"id":2765,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/2764\/revisions\/2765"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media\/2763"}],"wp:attachment":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2764"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}