<table width="1000" border="0" align="center" cellspacing="0" >
<tr>
<td><!-- #include file="head.asp" --></td>
</tr>
<tr>
<td><div class="STYLE1">圣林書院 </div></td>
</tr>
<tr>
<td><div align="left">
<!-- #include file="body.asp" -->
</div></td>
</tr>
<tr>
<td> <%=wenzi%></td>
</tr>
<tr>
<td>
<table width="300" border="0" cellspacing="0" >
<tr>
<%
dim rs,sql
for i=1 to len(wenzi)
set rs=server.createobject("adodb.recordset")
sql="select * from ziku where danzi like '%"& mid(wenzi,i,1) &"%'"
rs.open sql,conn,3,3
%>
<%
%>
<td ><a href="https://bbs.csdn.net/topics/images/ziku/<%=rs("pic")%>" target="_blank"><img src="https://bbs.csdn.net/topics/images/ziku/<%=rs("pic")%>" width="250" height="250" border="0" /></a></td>
<%
rs.close
set rs=nothing
%>
<%
next
%>
</tr>
</table>
</p></td>
</tr>
</table>
uj5u.com熱心網友回復:
<table width="100%" border="0" cellpadding="0" cellspacing="5"><%
for xx =0 to rs.recordcount-1
if (xx+1) mod 4=1 then
%>
<tr>
<td>圖片內容</td>
<%
elseif (xx+1) mod 4=0 then
%>
<td>圖片內容</td>
</tr>
<%
else
%>
<td>圖片內容</td>
<%
end if
next
if rs.recordcount>0 and rs.recordcount mod 4<>0 then
for xx =1 to 4-(rs.recordcount mod 4)
%>
<td>空內容,不足4個補齊</td>
<%
next
response.Write("</tr>")
end if
%>
</table>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/28832.html
標籤:ASP
上一篇:jq
