Skip to content

Commit

Permalink
Update personal.html
Browse files Browse the repository at this point in the history
  • Loading branch information
lmj01 committed Dec 2, 2023
1 parent 2b02f8c commit f320dfd
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions html/personal.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,25 @@ <h4 id="section1">生日</h4>
}
computeTimeDate(div20220828, birthSon, true, false);
computeTimeDate(div19960124, birthDarling, true, true);
computeTimeDate(div19870903, birthSelf, false, true);
computeTimeDate(div19870903, birthSelf, false, true);
let ud = {
otherBirth: '',
}
document.getElementById('inputOtherBirth').addEventListener('change', (event)=>{
const otherBirth = event.target.value;
if (otherBirth) computeTimeDate(divOtherInfo, new Date(otherBirth),
document.getElementById('checkboxOtherBirth').checked,
document.getElementById('checkboxOtherBirth').checked);
ud.otherBirth = event.target.value;
updateOtherBirth();
})
document.getElementById('checkboxOtherBirth').addEventListener('change', (event)=>{
updateOtherBirth();
});
document.getElementById('checkboxOtherBirthType').addEventListener('change', (event)=>{
updateOtherBirth();
});
function updateOtherBirth() {
computeTimeDate(divOtherInfo, new Date(ud.otherBirth),
document.getElementById('checkboxOtherBirth').checked,
document.getElementById('checkboxOtherBirthType').checked);
}
</script>
</div>
</body>
Expand Down

0 comments on commit f320dfd

Please sign in to comment.