Today, a working student asked me for help:
1. When a page is loaded, the current date is displayed in one place, and each of the left and right arrows indicates the last week and the next week respectively.
The following table shows each date of the week, from Monday to Sunday.
2. The left and right arrows show the day of the previous week or next week, and the following table shows each date of the previous week or next week.
JS itself does not provide the date addition and subtraction operation capability, so I wrote several methods to operate the date, mainly to add and subtract the date.
Author: Wen min, CTO of Chenzhou
JsDate.htm
<Body onload = "ini ()"> partition → <table id = "tb1" border = "1" style = "font-size: 10pt "> <tr> <td> </td> <td> </tr> </table>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]