注册 登录
编程论坛 ASP技术论坛

asp判断问题

nixy 发布于 2007-08-14 12:11, 521 次点击
请教各位大侠,如何在actagnt里的AC/AV/AB三种值中判断出来在表里显示中文,我需要的结果是:AC=运输,AV=销售,AB=库存
<td bgcolor="#FFFFFF" height="15" align="center" width="79" style="border-style: none; border-width: medium">
<font size="2"><%=rs("actagnt")%></font></td>
5 回复
#2
hmhz2007-08-14 12:51
<%
function dj(i)
Select Case i
Case "AC" dj="运输"
Case "AV" dj="销售"
Case "AB" dj="库存"
End Select
end function
%>
<%=dj(rs("actagnt"))%>
#3
nixy2007-08-14 15:45
谢谢大虾
#4
通缉犯2007-08-14 21:52
〈%
if rs("actagnt")="AC" then
response.write "运输"
end if
if rs("actagnt")="AV" then
response.write "销售"
end if
if rs("actagnt")="AB" then
response.write "库存"
end if
%〉
#5
想象力2007-08-16 09:40

Select Case actagnt
Case "AC" response.write "运输
Case "AV" response.write "销售"
Case "AB" response.write "库存"
End Select

前提是你做了actagnt=trim( request("select"))的这种格式

其实vb里面做相关选择
select这样写不知道可不可以

#6
haxin2007-08-16 09:45
有点怪
1