您的位置:程序门 -> web 开发 -> asp



菜鸟提问:为何我的图片读取不出来?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


菜鸟提问:为何我的图片读取不出来?
发表于:2008-01-22 15:41:38 楼主
jscript code
<% function cutstr(tempstr,tempwid) if len(tempstr)>tempwid then cutstr=left(tempstr,tempwid)&"..." else cutstr=tempstr end if end function%> <html> <body> <table width=100% border=0 cellspacing=1 cellpadding=1 bgcolor=#b50aa8> <%i=1 set rs_product=server.createobject("adodb.recordset") sqltext="select top 24 * from product where passed=true and elite=true order by updatetime desc" rs_product.open sqltext,conn,1,1 %> <tr> <% do while not rs_product.eof %> <td width="120" height="22" bgcolor="#fddffb"><table width="120" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="150" valign="middle"> <div align="center"><a href='productshow.asp?id=<%=rs_product("id")%>' target=_blank title='<%=rs_product("title")%>'> <%if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then%> <img src="<%if rs_product("defaultpicurl")="" then%>img/nopic.gif<%else%><%=rs_product("defaultpicurl")%><%end if%>" alt="<%=rs_product("title")%>" width="100%" height="100" border="0" onload="javascript:drawimage(this);" /> <%end if%></a> <a href='productshow.asp?id=<%=rs_product("id")%>' target=_blank title='<%=rs_product("title")%>'><%=cutstr(rs_product("title"),8)%></a></div></td> </tr> </table></td> <% if i mod 4=0 then%></tr> <tr> <% end if %> <% i=i+1 rs_product.movenext loop rs_product.close %></tr> </table>
发表于:2008-01-22 15:44:331楼 得分:0
没有看到你给fileext赋值,不知道那块的判断有什么意义


快速检索

最新资讯
热门点击