asp select case 问题
<%dimhytjcountFunctionGetStar(hytjCount)selectcasehytjCountcase1GetStar="<imgsrc=imag...
<%
dim hytjcount
Function GetStar(hytjCount)
select case hytjCount
case 1
GetStar = "<img src=images/1x.png>"
case (hytjCount>1 and hytjCount<=5)
GetStar = "<img src=images/2x.png>"
case (hytjCount>5 and hytjCount<10)
GetStar = "<img src=images/3x.png>"
case (hytjCount>=10 and hytjCount<=20 )
GetStar = "<img src=images/4x.png>"
case (hytjCount>=21 and hytjCount<=500)
GetStar = "<img src=images/5x.png>"
case else
GetStar = "<img src=images/bullet.gif>"
end select
end function
%>
case 的范围老是显示不准确,该怎么啊? vb 中好像,能用 5 to 10 来表示范围, 在asp 中. 提示有语法错误. . 展开
dim hytjcount
Function GetStar(hytjCount)
select case hytjCount
case 1
GetStar = "<img src=images/1x.png>"
case (hytjCount>1 and hytjCount<=5)
GetStar = "<img src=images/2x.png>"
case (hytjCount>5 and hytjCount<10)
GetStar = "<img src=images/3x.png>"
case (hytjCount>=10 and hytjCount<=20 )
GetStar = "<img src=images/4x.png>"
case (hytjCount>=21 and hytjCount<=500)
GetStar = "<img src=images/5x.png>"
case else
GetStar = "<img src=images/bullet.gif>"
end select
end function
%>
case 的范围老是显示不准确,该怎么啊? vb 中好像,能用 5 to 10 来表示范围, 在asp 中. 提示有语法错误. . 展开
展开全部
帮你改了一下代码,你再试试
dim hytjcount
Function GetStar(hytjCount)
select case true
case (hytjCount=1)
GetStar = "<img src=images/1x.png>"
case (hytjCount>1 and hytjCount<=5)
GetStar = "<img src=images/2x.png>"
case (hytjCount>5 and hytjCount<10)
GetStar = "<img src=images/3x.png>"
case (hytjCount>=10 and hytjCount<=20 )
GetStar = "<img src=images/4x.png>"
case (hytjCount>=21 and hytjCount<=500)
GetStar = "<img src=images/5x.png>"
case else
GetStar = "<img src=images/bullet.gif>"
end select
end function
dim hytjcount
Function GetStar(hytjCount)
select case true
case (hytjCount=1)
GetStar = "<img src=images/1x.png>"
case (hytjCount>1 and hytjCount<=5)
GetStar = "<img src=images/2x.png>"
case (hytjCount>5 and hytjCount<10)
GetStar = "<img src=images/3x.png>"
case (hytjCount>=10 and hytjCount<=20 )
GetStar = "<img src=images/4x.png>"
case (hytjCount>=21 and hytjCount<=500)
GetStar = "<img src=images/5x.png>"
case else
GetStar = "<img src=images/bullet.gif>"
end select
end function
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询