
编写ASP程序:要求根据系统时间来判断是上午、中午、下午、还是晚上。
假设定6:00-12:00为上午,12:00-14:00为中午,14:00-19:00为下午,19:00-06:00为晚上。...
假设定6:00-12:00为上午,12:00-14:00为中午,14:00-19:00为下午,19:00-06:00为晚上。
展开
2个回答
展开全部
<%
thetime=hour(time)
if thetime>=6 and thetime=<11 then
response.write("早上")
end if
if thetime=>12 and thetime=<13 then
response.write("中午")
end if
if thetime=>14 and thetime=<18 then
response.write("下午")
end if
if thetime=>19 and thetime=<23 then
response.write("晚上")
end if
if thetime=>0 and thetime=<5 then
response.write("凌晨")
end if
%>
thetime=hour(time)
if thetime>=6 and thetime=<11 then
response.write("早上")
end if
if thetime=>12 and thetime=<13 then
response.write("中午")
end if
if thetime=>14 and thetime=<18 then
response.write("下午")
end if
if thetime=>19 and thetime=<23 then
response.write("晚上")
end if
if thetime=>0 and thetime=<5 then
response.write("凌晨")
end if
%>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?

2025-08-05 广告
Paykka 从多个环节帮助用户节省时间,开户最快 1 个工作日完成,本地货币结算当日到账,提现更是几秒内就能完成。全流程都极大地缩短了时间成本,减少了用户的等待时间,提高了资金流转效率。...
点击进入详情页
本回答由paykka提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询