用vbscript编写一段程序绘制2000-2050年的年历。

来源:百度知道 编辑:UC知道 时间:2024/05/28 07:21:48
要求:
根据菜单项选择月(下拉式菜单)和年(带有滚动条的菜单),输出给定的年和月的日历。
网络编程!

<%
if request("YearStr")="" then ThisYear=year(now()) else ThisYear=request("YearStr")
if request("MonthStr")="" then ThisMonth=month(now()) else ThisMonth=request("MonthStr")

if ThisMonth=1 then
LastYear=ThisYear-1
LastMonth=12
NextYear=ThisYear
NextMonth=ThisMonth+1
elseif ThisMonth=12 then
LastYear=ThisYear
LastMonth=ThisMonth-1
NextYear=ThisYear+1
NextMonth=1
elseif ThisMonth<>1 and ThisMonth<>12 then
LastYear=ThisYear
LastMonth=ThisMonth-1
NextYear=ThisYear
NextMonth=ThisMonth+1
end if

%>
<script type="text/JavaScript">
<!--window.self.location.href
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".frame1.location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}<