| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 530 人关注过本帖
标题:这是日历编码,我是照书抄的,但还是出错了 下面是原码
只看楼主 加入收藏
chenkun
Rank: 1
等 级:新手上路
帖 子:33
专家分:0
注 册:2007-5-19
收藏
 问题点数:0 回复次数:2 
这是日历编码,我是照书抄的,但还是出错了 下面是原码

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>日历</title>
</head>
<body>
<%
function countDays(iMonth,iYear)
select case iMonth
case 1,3,5,7,8,10,12
countDays=31
case 2
if isdate("2/29/"&iYear) then
countDays=29
else
countDays=28
end if
end select
end function
function firstDay(iMonth,iYear)
FirstDay=weekDay(iMonth&"/1/"&iYear)
end function
dim mMonth,mYear
mMonth=Month(date())
mYear=Year(date())
mDay=Day(date())
response.Write"<center>"&mYear&"年"&mMonth&"月"&"</center><hr>"
%>
<table border="1" cellpadding="5" cellspacing="0" width="80%">
<tr>
<td>星期日</td>
<td>星期一</td>
<td>星期二</td>
<td>星期三</td>
<td>星期四</td>
<td>星期五</td>
<td>星期六</td>
</tr>
<tr>
<%
j=1
for i=1 to 42
response.Write"<td align=right>"
if i>=FirstDay(mMonth,iYear) and j<=countDays(mMonth,mYear) then
if mDate=j then
response.Write"<font color=blue>"&j&"</font>"
else
response.Write j
end if
j=j+1
else
response.Write "&nbsp;"
end if
response.Write"</td>"
if i mod 7=0 then
response.Write"</tR><tr>"
end if
next
%>
</tr>
</table>
</body>
</html>

搜索更多相关主题的帖子: 日历 编码 
2007-06-18 09:11
chenkun
Rank: 1
等 级:新手上路
帖 子:33
专家分:0
注 册:2007-5-19
收藏
得分:0 
错识是

Microsoft VBScript 运行时错误 错误 '800a000d'

类型不匹配: '[string: "6/1/"]'

/1.asp,行 22

2007-06-18 09:12
xiaohonghui0
Rank: 1
等 级:新手上路
威 望:1
帖 子:274
专家分:0
注 册:2006-4-10
收藏
得分:0 
你的代码贴得不行,重帖下。
网上有许多日历的代码,你也可找找看。

曾用asp做过公司管理系统,新闻发布系统,个人网站之类,可代做网站 有意者请联系我,电话:13714123661
2007-06-18 14:53
快速回复:这是日历编码,我是照书抄的,但还是出错了 下面是原码
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.010954 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved