<p> <style> td {font-family: "安体"; font-size:9pt} </style> <body bgcolor = "eeeeeee"> <table cellpadding = "0" cellpacing = "1" bgcolor = "ddddddd" align = center> <% '現在の年と月に基づいています。 request( "reqdate")= "" "then currentdate = date else currentdate = trim(request(" reqdate "))の場合はpyear = year(currentdate)pmonth = month(currentdate)</p> <p> '次のコードは、カレンダーディスプレイのテーブルヘッダーコンテンツを生成します> <入力型= "button" value = "<<" onclick = "javascript:location.href = '?reqdate = <%= dateadd(" m "、-1、currentdate)%>'"> </td> <td colspan = "5" align = "center"> <%= pmonth%<%= pmonth%</td < type = "button" value = ">>" onclick = "javascript:location.href = '?reqdate = <%= dateadd(" m "、1、currentdate)%>'"> </td> </tr> <tr align = "center" bgcolor = " <td> 3 </td> <td> 4 </td> <td> 5 </td> <td> six </td> </td> </tr> <tr align = center bgcolor = ffffff height = 19> <% 'ASPには機能がないため、合計月にある日があるため、他のアルグリスムを介して入手する必要があります。アルゴリズムは実際には非常に単純です。これは、月の1日目の間に合計で表示される日数= formatdateTime(month(currentdate)& "/1/"&year(currentdate))todate = formatdateTime(dateadd( "m"、fromdate) '(fromdate)' 「月の1日目の間に合計を取得して、翌月の1日目から展示されます(合計で何日があるか) 'テーブルを生成して表示し、i = 1を表示するには、i <maxi iv = i-nunmonthstartの場合はi> nunmonthsstartおよびi <= nunmonthend+nunmonthstart then' if iv = day(now)= pmonth and year(now)= pyear then Response.write( " "</td>")else respons.write( "<td align = center>"&iv& "</td>")の場合はend.write.write.write( "<td> </td>")終了</p> <p> '7で除算できる場合(7が1行あたり表示される) bgcolor = ffffff height = 19> ")i = i+1 loop%> </table> </body>の場合は終了します [ctrl+a Select All注:外部JSを導入する必要がある場合は、実行するには更新する必要があります]