回 帖 发 新 帖 刷新版面

主题:[讨论]求助:有哪们高手知道如何在ASP中实现不同的条件显示不同的图片

我想实现一个程序,不同的条件下,显示不同图片,我知道可以用if else语句,但是, 显示图片的语句我不知道怎么实现,请问哪位高手可以帮忙指点一下?

回复列表 (共4个回复)

沙发

<img src="图片的路径">

板凳


不是这么简单拉

3 楼

根据不同的条件将图片路径改成不同的就可以显示了。

4 楼

是在ASP 页面的,代码如下        <script language="javascript">
 
    function colorcode
          Set rs= Server.CreateObject("ADODB.Recordset")
            rs.open sql_Text,conn,1,1            
            if rs("price1")>10.00 then
                document.write("<IMG SRC="images/circleblue.gif"  BORDER=0 HEIGHT=36 WIDTH=37>")
            elseif rs("price1")>7.00 then
                document.write("<IMG SRC="images/circleblue.gif"  BORDER=0 HEIGHT=36 WIDTH=37>")
            elseif rs("price1")>6.00 then
                document.write("<IMG SRC="images/circleblue.gif"  BORDER=0 HEIGHT=36 WIDTH=37>")
            elseif rs("price1")>5.50 then
                document.write("<IMG SRC="images/circleblue.gif"  BORDER=0 HEIGHT=36 WIDTH=37>")
            elseif rs("price1")>4.50 then
                document.write("<IMG SRC="images/circleblue.gif"  BORDER=0 HEIGHT=36 WIDTH=37>")
            elseif rs("price1")>4.00 then
                document.write("<IMG SRC="images/circleblue.gif"  BORDER=0 HEIGHT=36 WIDTH=37>")
            elseif rs("price1")<4.00 then
                document.write("<IMG SRC="images/circleblue.gif"  BORDER=0 HEIGHT=36 WIDTH=37>")
            
            end if

        End function
        
        
</script> PRICE <%=colorcode %>

但是调试是显示不出来的,

我来回复

您尚未登录,请登录后再回复。点此登录或注册