ASP代码考试急求。
发布网友
发布时间:2022-05-17 02:19
我来回答
共1个回答
热心网友
时间:2023-09-21 09:11
<%dim mydatemydate=date()response.Write("今天是:"+cstr(year(mydate))&"年"&cstr(month(mydate))&"月"&cstr(day(mydate))&"日 ")select case weekday(mydate)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
%><SCRIPT Language="VBScript">dim moTime
function showTime()document.all.spnTime.innerText = time()end function
moTime = setInterval("showTime()",1000)
</SCRIPT><span id="spnTime"> </span><%h=hour(now())if 0<=h and h<6 then response.write "凌晨好!"if 6<=h and h<8 then response.write "早上好!"if 8<=h and h<11 then response.Write"上午好!"if 11<=h and h<13 then response.write "中午好!"if 13<=h and h<18 then response.Write"下午好!"if 18<=h and h<22 then response.Write"晚上好!"if 22<=h and h<24 then response.Write"夜已深,您该休息了!"
%>