关于ASP 根据当前字段内容,条件显示不同的文字

来源:百度知道 编辑:UC知道 时间:2024/05/19 20:15:26
<%count=0
do while not rs.eof and count<rs.pagesize %>
<%if count Mod 2=0 then%>
<TR bgcolor="#F5FAFE" onMouseOver="this.style.backgroundColor='#FFDA6A'" onMouseOut="this.style.backgroundColor='#F5FAFE'">
<%else%><TR bgcolor="#E2EEFC" onMouseOver="this.style.backgroundColor='#FFDA6A'" onMouseOut="this.style.backgroundColor='#E2EEFC'">
<%end if%>

<td height="22"><div align="center">
<input name="seltyid" type="checkbox" id="seltyid" value="<%=rs("id")%>">
</div></td>
<td height="22">序号ID:<%=xuhuan2+1%> 数据ID:<%=rs("id")%></td>
<td height="22"><div align="center"><span class=&qu

if shenhe1=0

shenhe1 是哪来的呢?前面没见到,没有初始化会默认为0

搞清楚和session("shenhe1")不是同一样东西哦

*************
是这样定义的,会保存在session里面,但是调用是要完全调用
例如session("shenhe1")
也就是说session("shenhe1")和shenhe1是不一样的

################
if session("shenhe1")="0"
为什么要双引号扩住0呢?"0"和意义不同
另外,临时数据每次都保存在session里面的话
因为session是共用的数据,最后只会保存最后一次的值

$$$$$$$$$$$$$$

这样修改吧
dim shenhe1
shenhe1=rs("user_info_shenhe")
shenhe1=shenhe1+0

shenhe1=0 then
response.write"成功"
else
response.write"不成功"
end if

*****************
不可能,shenhe1每次循环会重置,怎么会累加
改为
dim shenhe1
shenhe1=0
shenhe1=rs("user_info_shenhe")+0
if shenhe1=0 then
response.write"成功"
else
response.write"不成功"
end if
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hmmm