
vb高手请进啊!!!在线等!!!!
偶想做一个显示该flash的受欢迎程度的图形界面,写了一大堆的代码,但是不对,(初学,希望那位高手给指导一下,或给个更简单的也行)代码:<%dimlxlx=Reflash...
偶想做一个显示该flash的受欢迎程度的图形界面,写了一大堆的代码,但是不对,(初学,希望那位高手给指导一下,或给个更简单的也行)
代码:
<%
dim lx
lx = Reflash.Fields.Item("fl_dianjishu").Value
///定义的这个没问题,lx是数字型的
if lx <= "10" then
response.write("★")
end if
if lx <= "20" and lx > "10" then
response.write("★★")
end if
if lx <= "30" and lx > "20" then
response.write("★★★")
end if
if lx <= "50" and lx > "30" then
response.write("★★★★")
end if
if lx <= "80" and lx > "50" then
response.write("★★★★★")
end if
if lx <= "150" and lx > "80" then
response.write("★★★★★★")
end if
if lx > "150" then
response.write("★★★★★★★")
end if
%>
结果总是出现一大堆的★ 展开
代码:
<%
dim lx
lx = Reflash.Fields.Item("fl_dianjishu").Value
///定义的这个没问题,lx是数字型的
if lx <= "10" then
response.write("★")
end if
if lx <= "20" and lx > "10" then
response.write("★★")
end if
if lx <= "30" and lx > "20" then
response.write("★★★")
end if
if lx <= "50" and lx > "30" then
response.write("★★★★")
end if
if lx <= "80" and lx > "50" then
response.write("★★★★★")
end if
if lx <= "150" and lx > "80" then
response.write("★★★★★★")
end if
if lx > "150" then
response.write("★★★★★★★")
end if
%>
结果总是出现一大堆的★ 展开
3个回答
展开全部
要用if else
因为当你的点击数是10一下的时候,已经有了一个星
当大于10的时候又再加两个星,就变成3个星
所以结果是很多星,而不是你所想的那些星
因为当你的点击数是10一下的时候,已经有了一个星
当大于10的时候又再加两个星,就变成3个星
所以结果是很多星,而不是你所想的那些星
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
if lx <= 10 then
response.write("★")
end if
if lx <= 20 and lx > 10 then
response.write("★★")
end if
if lx <= 30 and lx > 20 then
response.write("★★★")
end if
if lx <= 50 and lx > 30 then
response.write("★★★★")
end if
if lx <= 80 and lx > 50 then
response.write("★★★★★")
end if
if lx <= 150 and lx > 80 then
response.write("★★★★★★")
end if
if lx > 150 then
response.write("★★★★★★★")
end if
response.write("★")
end if
if lx <= 20 and lx > 10 then
response.write("★★")
end if
if lx <= 30 and lx > 20 then
response.write("★★★")
end if
if lx <= 50 and lx > 30 then
response.write("★★★★")
end if
if lx <= 80 and lx > 50 then
response.write("★★★★★")
end if
if lx <= 150 and lx > 80 then
response.write("★★★★★★")
end if
if lx > 150 then
response.write("★★★★★★★")
end if
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
"10",去掉那个双引号试试
希望能帮得上忙!
希望能帮得上忙!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询