<p> <tyle> td {font-family: "安体"; Ukuran font: 9pt} </tyle> <body bgcolor = "eeeeeeeee"> <tabel cellpadding = "0" cellpacing = "1" bgcolor = "dddddddd" align = no pow-an. ditampilkan berdasarkan tahun dan bulan berjalan. If Request("ReqDate")="" then CurrentDate=Date else CurrentDate=Trim(Request("ReqDate")) end if pyear=year(CurrentDate) pmonth=month(CurrentDate)</p><p>'The following code generates the table header content for the calendar display %> <tr align="LEFT" bgcolor="#ddddddd"> <td align = "center"> <input type = "tombol" value = "<<" onclick = "javascript: location.href = '? reqdate = <%= dateadd (" m ",-1, currentDate)%>'"> </td </td colspan = "5" Align = "center"> </td </td colspan = "5" Align = "center"> </td </td colspan = "5" Align = "center"> </td tahun = pmor = "5" Align = "center"> </td tahun =%= "5" Align = "center"> </td td colspan = "5" center "> </td colspan =" 5 "center"> align = "center"> <input type = "Tombol" value = ">>" onclick = "javascript: location.href = '? reqdate = <%= dateadd (" m ", 1, currentDate)%>'" </td> </tr> <TRTLIGN = "center" bgcolor = "#ccccc </tdcc </td> <TR/DAIgn =" center "bgcolor ="#ccccccccccccccccccccccccccccccc </td> <td>two</td> <td>three</td> <td>four</td> <td>five</td> <td>six</td> </tr> <tr align=center bgcolor=ffffff height=19> <% 'Since there is no function in ASP that specifies how many days there are in total for the specified month, we need to obtain it through other algorithms. Algoritma ini sebenarnya sangat sederhana, yaitu untuk menghitung berapa hari ada total antara hari pertama bulan yang akan ditampilkan dariDate = formatTeTime (bulan (CurrentDate) & "/1/" & tahun (CurrentDate)) TOPER = FORMATDATETIME (DATEADD ("M" nunmonthstart=weekday(fromDate)-1 'Get the total between the 1st day of the month to be displayed from the 1st day to the 1st day of the next month to be displayed (how many days there are in total) nunmonthend=DateDiff("d",fromDate, toDate) 'To determine how many rows of tables are needed to display the calendar (7 days per row) if NunmonthStart+nunmonthend <36 lalu maxi = 36 lain maxi = 43 end jika 'ubah untuk menghasilkan tabel dan menampilkan i = 1 lakukan sementara i <maxi iv = i nunmonthstart jika saya> nunmonthstart dan saya <= nunmonthend+nunmontart saat itu' if iv = day (sekarang) dan bulan (sekarang) = pm (nunmonth (nunmanthstart saat itu 'if iv = day (sekarang) dan bulan (sekarang) (nunmonthend+nunmonthstart saat itu' if iv = day (sekarang) dan bulan sekarang) = pm. align = tengah bgcolor = ffaaa> "& iv &" </td> ") lain respons.write (" <td align = center> "& iv &" </td> ") berakhir jika lain respons.write (" <td> </td> ") berakhir jika </p> <p> 'jika itu dapat divisibile dengan 7 tahun. response.write ("</tr> <tr align = center bgcolor = ffffff tinggi = 19>") end jika i = i+1 loop%> </able> </body> [Ctrl+A Select All Catatan: Jika Anda perlu memperkenalkan JS eksternal, Anda perlu menyegarkan untuk mengeksekusi]