标题:帮我看看为什么红色代码部分不能实现功能
只看楼主
若渴
Rank: 2
等 级:论坛游民
帖 子:22
专家分:27
注 册:2011-10-8
结帖率:100%
 问题点数:0 回复次数:1 
帮我看看为什么红色代码部分不能实现功能
<%
Response.write(Time())
Response.Write(Hour(Time()))
mydate=Hour(Time())
Response.Write(mydate)
Select Case mydate
Case 12,13,14,15,16,17,18
      Response.write("下午好!")
Case 19,20,21,22,23,24
     Response.write("晚上好!")
Case  0,1,2,3,4,5,6
     Response.write("夜间好!")
Case 7,8,9,10,11
      Response.write("早上好!")
End Select      
      

if ((mydate>=12) and (mydate <=18)) Then Response.write("下午好!")
Else If ((mydate>18)and(mydate<=24)) Then Response.write("晚上好!")
Else If ((mydate>0)and(mydate<=6)) Then Response.write("夜间好!")
Else ((mydate>6)and(mydate<12)) Then Response.write("早上好!")
End If
搜索更多相关主题的帖子: 晚上好 
2011-10-11 20:40
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
得分:0 
<html>
 <head>
     <title>test</title>
 </head>
 <body>
     <%
     Response.write(Time())
     Response.Write(Hour(Time()))
     Dim mydate
     mydate=Hour(Time())
     Response.Write(mydate)
     Select Case mydate
     Case 12,13,14,15,16,17,18
       Response.write("下午好!")
     Case 19,20,21,22,23,24
       Response.write("晚上好!")
     Case  0,1,2,3,4,5,6
       Response.write("夜间好!")
     Case 7,8,9,10,11
       Response.write("早上好!")
     End Select      
      

     if mydate>=12 and mydate<=18 Then
         Response.write "下午好!"
     ElseIf mydate>18 and mydate<=24 Then
         Response.write "晚上好!"
     ElseIf mydate>0 and mydate<=6 Then
         Response.write "夜间好"
     ElseIf mydate>6 and mydate<12 Then
         Response.write "早上好"
     End if
     %>
 </body>
</html>
2011-10-12 14:29



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-352121-1-1.html




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

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