| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 350 人关注过本帖
标题:IF语句错误,请教
只看楼主 加入收藏
wugang901
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-3-20
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:2 
IF语句错误,请教
语法错误
/index.asp, line 11
elseif time<#19:00:00# and time>=#12:00:00# then strgreeting = "下午好!welcome"



源代码
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>插入ASP代码</title>
</head>
<body bgcolor="#00CCFF">
<%
if time<#12:00:00# and time>=#00:00:00# then strgreeting = "上午好!welcome"
elseif time<#19:00:00# and time>=#12:00:00# then strgreeting = "下午好!welcome"
end if

%>
<%= strgreeting %>


<body>

</body>
</html>
搜索更多相关主题的帖子: 源代码 welcome 
2012-03-21 13:26
wangjy500
Rank: 11Rank: 11Rank: 11Rank: 11
等 级:贵宾
威 望:13
帖 子:457
专家分:2569
注 册:2010-7-11
收藏
得分:10 
#号去掉看看。

QQ:63572063
2012-03-21 21:16
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:10 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>插入ASP代码</title>
</head>
<body bgcolor="#00CCFF">
<%
if Hour(Now)<12 and Hour(Now)>=0 then strgreeting = "上午好!welcome"
elseif Hour(Now)<19 and Hour(Now)>=12 then strgreeting = "下午好!welcome"
end if

%>
<%= strgreeting %>
2012-03-21 21:39
快速回复:IF语句错误,请教
数据加载中...
 
   



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

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