更改说明:以下代码总共显示4张图片,上面两张,下面两张;现在我要改为总共显示12张,上面6张,下面6张;谁能更改正确,高分悬赏20分!绝不食言!
原先正确代码如下:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="114" height="30"> <span class="style1"><font color="#000000">图片新闻</font></span></td>
<td> </td>
</tr>
<%if application("imagenews_kr01")="" then
sql="select top 4 * from NEWS where firstImageName<>'' and ok=true order by infotime desc,id desc"
rs.open sql,conn,1,1
dbcount=dbcount+1
if rs.eof and rs.bof then
response.write "<tr><td colspan=2 height=545 valign=top>暂无图片新闻!</td></tr>"
else
msg=""
for xxx=1 to 4
msg=msg&"<tr><td height=50% align=center><a href='"&rs("newsurl")&"' target='_blank' class=hui>"
msg=msg&"<img width=110 height=90 class=imgbor src='"&rs("firstImageName")&"' alt='"&delhtmlcode(rs("title"))&"'><br>"&left(delhtmlcode(rs("title")),8)&"</a></td>"
rs.movenext
if rs.eof then exit for
msg=msg&"<td height=50% align=center><a href='"&rs("newsurl")&"' target='_blank' class=hui>"
msg=msg&"<img width=110 height=90 class=imgbor src='"&rs("firstImageName")&"' alt='"&delhtmlcode(rs("title"))&"'><br>"&left(delhtmlcode(rs("title")),8)&"</a></td></tr>"
rs.movenext
if rs.eof then exit for
next
application.Lock
application("imagenews_kr01")=msg
application.UnLock
response.write application("imagenews_kr01")
end if
rs.close
else
response.write application("imagenews_kr01")
end if
%>
</table>
直接这样改不行,否则我也不会发出来麻烦大家了!!
for xxx=1 to 4
改
for xxx=1 to 12
回复:回答者:baibianjinlin
我上面的代码总共显示2行,4张图片!你改的偶试了,不行!!
希望大家帮偶再看看!!