{"id":3505,"date":"2024-05-31T11:01:43","date_gmt":"2024-05-31T03:01:43","guid":{"rendered":"https:\/\/0592ban.cn\/?p=3505"},"modified":"2024-05-31T11:01:43","modified_gmt":"2024-05-31T03:01:43","slug":"%e5%ae%9e%e5%b2%81%e5%b9%b4%e9%be%84%e8%ae%a1%e7%ae%97-%e5%b1%9e%e9%bc%a0%e7%9a%842023%e5%b9%b4%e8%99%9a%e5%b2%81-%e5%ae%9e%e5%b2%81%e5%b9%b4%e9%be%84%e8%ae%a1%e7%ae%97%e5%99%a8","status":"publish","type":"post","link":"https:\/\/0592ban.cn\/index.php\/2024\/05\/31\/%e5%ae%9e%e5%b2%81%e5%b9%b4%e9%be%84%e8%ae%a1%e7%ae%97-%e5%b1%9e%e9%bc%a0%e7%9a%842023%e5%b9%b4%e8%99%9a%e5%b2%81-%e5%ae%9e%e5%b2%81%e5%b9%b4%e9%be%84%e8%ae%a1%e7%ae%97%e5%99%a8\/","title":{"rendered":"\u5b9e\u5c81\u5e74\u9f84\u8ba1\u7b97 \u5c5e\u9f20\u76842023\u5e74\u865a\u5c81 (\u5b9e\u5c81\u5e74\u9f84\u8ba1\u7b97\u5668)"},"content":{"rendered":"<p><img decoding=\"async\" alt=\"\u5b9e\u5c81\u5e74\u9f84\u8ba1\u7b97\u5668\" loading=\"lazy\" src=\"https:\/\/0592ban.cn\/wp-content\/uploads\/2024\/05\/a678bdff-cede-426b-b02f-3432293fb409.jpg\"\/><\/p>\n<form>\n <label for=\"birth_year\"><br \/>\n  \u51fa\u751f\u5e74\u4efd\uff1a<br \/>\n <\/label><br \/>\n <input id=\"birth_year\" type=\"number\"\/><br \/>\n <label for=\"zodiac\"><br \/>\n  \u5c5e\u76f8\uff1a<br \/>\n <\/label><br \/>\n <select id=\"zodiac\"><option value=\"\u9f20\"><br \/>\n   \u9f20<br \/>\n  <\/option><option value=\"\u725b\"><br \/>\n   \u725b<br \/>\n  <\/option><option value=\"\u864e\"><br \/>\n   \u864e<br \/>\n  <\/option><option value=\"\u5154\"><br \/>\n   \u5154<br \/>\n  <\/option><option value=\"\u9f99\"><br \/>\n   \u9f99<br \/>\n  <\/option><option value=\"\u86c7\"><br \/>\n   \u86c7<br \/>\n  <\/option><option value=\"\u9a6c\"><br \/>\n   \u9a6c<br \/>\n  <\/option><option value=\"\u7f8a\"><br \/>\n   \u7f8a<br \/>\n  <\/option><option value=\"\u7334\"><br \/>\n   \u7334<br \/>\n  <\/option><option value=\"\u9e21\"><br \/>\n   \u9e21<br \/>\n  <\/option><option value=\"\u72d7\"><br \/>\n   \u72d7<br \/>\n  <\/option><option value=\"\u732a\"><br \/>\n   \u732a<br \/>\n  <\/option><\/select><br \/>\n <button type=\"submit\"><br \/>\n  \u8ba1\u7b97<br \/>\n <\/button><br \/>\n<\/form>\n<table>\n<thead>\n<tr>\n<th>\n    \u51fa\u751f\u5e74\u4efd\n   <\/th>\n<th>\n    \u5c5e\u76f8\n   <\/th>\n<th>\n    \u5e74\u9f84\uff08\u5468\u5c81\uff09\n   <\/th>\n<th>\n    \u5e74\u9f84\uff08\u865a\u5c81\uff09\n   <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\n    1960\n   <\/td>\n<td>\n    \u9f20\n   <\/td>\n<td>\n    54\n   <\/td>\n<td>\n    55\n   <\/td>\n<\/tr>\n<tr>\n<td>\n    1972\n   <\/td>\n<td>\n    \u9f20\n   <\/td>\n<td>\n    42\n   <\/td>\n<td>\n    43\n   <\/td>\n<\/tr>\n<tr>\n<td>\n    1984\n   <\/td>\n<td>\n    \u9f20\n   <\/td>\n<td>\n    30\n   <\/td>\n<td>\n    31\n   <\/td>\n<\/tr>\n<tr>\n<td>\n    1996\n   <\/td>\n<td>\n    \u9f20\n   <\/td>\n<td>\n    18\n   <\/td>\n<td>\n    19\n   <\/td>\n<\/tr>\n<tr>\n<td>\n    2008\n   <\/td>\n<td>\n    \u9f20\n   <\/td>\n<td>\n    6\n   <\/td>\n<td>\n    7\n   <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><script>\n const form = document.querySelector('form');<\/p>\n<p>    form.addEventListener('submit', (event) => {\n      event.preventDefault();<\/p>\n<p>      const birth_year = parseInt(document.querySelector('birth_year').value);\n      const zodiac = document.querySelector('zodiac').value;\n      const current_year = new Date().getFullYear();<\/p>\n<p>      const age_in_years = current_year - birth_year;\n      const age_in_lunar_years = age_in_years + 1;<\/p>\n<p>      const tableBody = document.querySelector('tbody');\n      const newRow = document.createElement('tr');\n      const birth_year_td = document.createElement('td');\n      const zodiac_td = document.createElement('td');\n      constage_in_years_td = document.createElement('td');\n      const age_in_lunar_years_td = document.createElement('td');<\/p>\n<p>      birth_year_td.textContent = birth_year;\n      zodiac_td.textContent = zodiac;\n      age_in_years_td.textContent = age_in_years;\n      age_in_lunar_years_td.textContent = age_in_lunar_years;<\/p>\n<p>      newRow.appendChild(birth_year_td);\n      newRow.appendChild(zodiac_td);\n      newRow.appendChild(age_in_years_td);\n      newRow.appendChild(age_in_lunar_years_td);<\/p>\n<p>      tableBody.appendChild(newRow);\n    });\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u51fa\u751f\u5e74\u4efd\uff0c\u5c5e\u76f8\uff0c\u9f20\u725b\u864e\u5154\u9f99\u86c7\u9a6c\u7f8a\u7334\u9e21\u72d7\u732a\u8ba1\u7b97\u51fa\u751f\u5e74\u4efd\u5c5e\u76f8\u5e74\u9f84\uff0c\u5468\u5c81\uff0c\u5e74\u9f84\uff0c\u865a\u5c81\uff0c1960\u9f2054551972\u9f2042431984\u9f2030311996\u9f2018192008\u9f2067constform=document.querySelector\uff0cform\uff0cform.addEventListener\uff0csubmit\uff0cevent\uff0c=\uff0cevent.p&#8230;\u3002<\/p>\n","protected":false},"author":1,"featured_media":3504,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2034,2033],"class_list":["post-3505","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-12shengxiao","tag-2034","tag-2033"],"_links":{"self":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/3505","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=3505"}],"version-history":[{"count":1,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/3505\/revisions"}],"predecessor-version":[{"id":3506,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/3505\/revisions\/3506"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media\/3504"}],"wp:attachment":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media?parent=3505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/categories?post=3505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/tags?post=3505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}