佛山淘宝培训班:asp 脚本语言的问题

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 12:19:23
我有一个相册代码 首页推荐只有四个 我改成8个 又不能换行 下面是这部分的源代码 请高手帮忙

<%
set rs=conn.execute("select * from title order by titleID desc")
for i=1 to 4
if rs.eof then exit for
%>
<td width="150" height="299" align="center" bgcolor="#FFFFFF">
<table width="100%" border="0" cellpadding="0" cellspacing="0" height="441">
<tr>
<td width="100%" height="365" align="center">
<%set rsShow=conn.execute("select photo from imgbook where titleID="&clng(rs("titleID"))&" order by ID desc")%>
<a href="Search.asp?titleID=<%=rs("titleID")%>&ClassID=<%=rs("ClassID")%>&KeyWords=<%=rs("titleName")%>" title="点击查看详细情况">
<script src="ShowPic.asp?FileName=manage/<%=rsShow("photo")%>"></script>
</a>
<%rsShow.Close
set rsShow=nothing%>
想2楼这位的改法我也会,改完以后都在一行显示没有用的 我想让他四个一行每四个一换行!

<%
set rs=conn.execute("select * from title order by titleID desc")
for i=1 to 8
if rs.eof then exit for
%>
<td width="150" height="299" align="center" bgcolor="#FFFFFF">
<table width="100%" border="0" cellpadding="0" cellspacing="0" height="441">
<tr>
<td width="100%" height="365" align="center">
<%set rsShow=conn.execute("select photo from imgbook where titleID="&clng(rs("titleID"))&" order by ID desc")%>
<a href="Search.asp?titleID=<%=rs("titleID")%>&ClassID=<%=rs("ClassID")%>&KeyWords=<%=rs("titleName")%>" title="点击查看详细情况">
<script src="ShowPic.asp?FileName=manage/<%=rsShow("photo")%>"></script>
</a>
<%rsShow.Close
set rsShow=nothing%>