宪法解释的作用主要是:我怎么才能在asp对象response.write 中写入 日期和星期 早上好,晚上好,中午好,凌晨好 程序

来源:百度文库 编辑:神马品牌网 时间:2024/05/08 07:57:44

仅供参考,未测试
<%
if hour(time)>1 and hour(time)<11 then
response.Write("早上好")
elseif hour(time)>=11 and hour(time)<14 then
response.write("中午好")
elseif hour(time)>=14 and hour(time)<18 then
response.write("下午好")
elseif hour(time)>=18 and hour(time)<=22 then
response.write("晚上好")
else
response.Write("夜猫子,该休息了!")
end if
select case weekday(now)
case 1
response.write("今天是星期日")
case 2
response.write("今天是星期一")
case 3
response.write("今天是星期二")
case 4
response.write("今天是星期三")
case 5
response.write("今天是星期四")
case 6
response.write("今天是星期五")
case 7
response.write("今天是星期六")
end select
%>

已经有人写了,厉害!

先写<%=now()%> 显示出时间 日期
在如2楼所说一样 判断

用now()获取时间,然后自己写个输出函数。