求高手帮忙看一下asp JAVAXCRIT 记录集循环显示 20
求高手帮忙改一下,代码如下,想要个一行显示三条记录的。然行后再显示三条记录,这样循环下去,共八行。意思就是一页共显示24长记录!拜托了!!!</tr></table></...
求高手帮忙改一下,代码如下,想要个一行显示三条记录的。然行后再显示三条记录,这样循环下去,共八行。意思就是一页共显示24长记录!拜托了!!!
</tr>
</table> </td>
<td colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="413" height="1460" valign="top"><% while ((Repeat2__numRows-- != 0) && (!gongx.EOF)) { %>
<table width="100%" height="128" border="0">
<tr>
<td width="54%" rowspan="6" align="center" valign="middle"><A HREF="zujdx.asp?<%= Server.HTMLEncode(MM_keepNone) + ((MM_keepNone!="")?"&":"") + "id=" + gongx.Fields.Item("id").Value %>"><img src="images/<%=(gongx.Fields.Item("tu1").Value)%>" alt="" width="220" height="180" /></A></td>
<td width="46%" height="30" align="center" valign="middle" class="biaoti"><%=(gongx.Fields.Item("mingc").Value)%></td>
</tr>
<tr>
<td height="30" nowrap="nowrap" class="hen">所属类别>>>>{<span class="lan"><%=(gongx.Fields.Item("leix").Value)%></span>}</td>
</tr>
<tr>
<td height="30" nowrap="nowrap"><span class="checu"><strong class="heibiao">市场价</strong><strong>:</strong></span><span class="checulan"><strong><%=(gongx.Fields.Item("shija").Value)%></strong></span></td>
</tr>
<tr>
<td height="30" nowrap="nowrap"><strong class="heibiao">会员价:</strong><strong class="hongbiao"><%=(gongx.Fields.Item("xianj").Value)%></strong></td>
</tr>
<tr>
<td height="30" nowrap="nowrap" class="hen"><strong>VIP价:</strong> 更优惠 </td>
</tr>
<tr>
<td nowrap="nowrap"><a href="gou.asp" target="_blank"><img src="images/imaegs-00/goumai.gif" alt="" width="40" height="18" border="0" /></a></td>
</tr>
</table>
<%
Repeat2__index++;
gongx.MoveNext();
}
%>
</td>
新手放门分不多了全部就这些请高手帮下忙!谢谢!!!!
数据库nongl.mdb表shangpi id ,leix,pija,shija,shuom,tu1,tu2,tu3,tu4,tu5,
初学,不懂代码!求高手帮改好,真接就能用的,感激不尽!!!!!谢谢谢谢谢谢!!!!!! 展开
</tr>
</table> </td>
<td colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="413" height="1460" valign="top"><% while ((Repeat2__numRows-- != 0) && (!gongx.EOF)) { %>
<table width="100%" height="128" border="0">
<tr>
<td width="54%" rowspan="6" align="center" valign="middle"><A HREF="zujdx.asp?<%= Server.HTMLEncode(MM_keepNone) + ((MM_keepNone!="")?"&":"") + "id=" + gongx.Fields.Item("id").Value %>"><img src="images/<%=(gongx.Fields.Item("tu1").Value)%>" alt="" width="220" height="180" /></A></td>
<td width="46%" height="30" align="center" valign="middle" class="biaoti"><%=(gongx.Fields.Item("mingc").Value)%></td>
</tr>
<tr>
<td height="30" nowrap="nowrap" class="hen">所属类别>>>>{<span class="lan"><%=(gongx.Fields.Item("leix").Value)%></span>}</td>
</tr>
<tr>
<td height="30" nowrap="nowrap"><span class="checu"><strong class="heibiao">市场价</strong><strong>:</strong></span><span class="checulan"><strong><%=(gongx.Fields.Item("shija").Value)%></strong></span></td>
</tr>
<tr>
<td height="30" nowrap="nowrap"><strong class="heibiao">会员价:</strong><strong class="hongbiao"><%=(gongx.Fields.Item("xianj").Value)%></strong></td>
</tr>
<tr>
<td height="30" nowrap="nowrap" class="hen"><strong>VIP价:</strong> 更优惠 </td>
</tr>
<tr>
<td nowrap="nowrap"><a href="gou.asp" target="_blank"><img src="images/imaegs-00/goumai.gif" alt="" width="40" height="18" border="0" /></a></td>
</tr>
</table>
<%
Repeat2__index++;
gongx.MoveNext();
}
%>
</td>
新手放门分不多了全部就这些请高手帮下忙!谢谢!!!!
数据库nongl.mdb表shangpi id ,leix,pija,shija,shuom,tu1,tu2,tu3,tu4,tu5,
初学,不懂代码!求高手帮改好,真接就能用的,感激不尽!!!!!谢谢谢谢谢谢!!!!!! 展开
2个回答
展开全部
<style>
a {
text-decoration:none;
color:#fff;
}
a:hover {
text-decoration:underline;
color:#f00;
}
</style>
<!--#include file="function.asp"-->
<%
if session("login")<>"OK" then
AlertAndGo"你还没有登录,请登录","denglu.asp"
else
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("data.mdb")
set rs = server.createobject("adodb.recordset")
rs.open "select * from [Hyman] ",conn,1,3
%>
<style type="text/css">
<!--
.style2 {color: #FF0000; font-size: 12px; }
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style5 {font-size: 12px; color: #000000; }
.style6 {color: #000000}
-->
</style>
<table width="771" border="1" align="center" cellspacing="0" bordercolor="#FF00FF">
<tr class="style2">
<td width="39" height="26" bgcolor="#00FF00"><div align="center" class="style2">ID</div></td>
<td width="116" bgcolor="#00FF00"><div align="center" class="style2">用户名</div></td>
<td width="318" height="26" bgcolor="#00FF00"><div align="center" class="style2">内容</div></td>
<td width="56" bgcolor="#00FF00"><div align="center">操作</div></td>
</tr>
<%for i = 1 to rs.recordcount%>
<tr bgcolor="#00FFFF">
<td height="22"><div align="center" class="style5">
<div align="center"><%=i%></div>
</div></td>
<td height="22"><div align="center" class="style5">
<div align="center"><%=rs("用户名")%></div>
</div></td>
<td width="1000" style="word-break:break-all"><div align="center" class="style5">
<div align="left"><%=rs("内容")%></div></td>
<td height="22"><div align="center" class="style5">
<div align="center"><a href="del.asp?id=<%=rs("id")%>" class="style6">删除</a></div>
</div></td>
</tr>
<%
rs.movenext
next
%>
</table>
<%end if
%>
这里的<%for i = 1 to rs.recordcount%>是循环显示数据库里的信息
不知道这个答案能不能帮你解决你的问题!
a {
text-decoration:none;
color:#fff;
}
a:hover {
text-decoration:underline;
color:#f00;
}
</style>
<!--#include file="function.asp"-->
<%
if session("login")<>"OK" then
AlertAndGo"你还没有登录,请登录","denglu.asp"
else
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("data.mdb")
set rs = server.createobject("adodb.recordset")
rs.open "select * from [Hyman] ",conn,1,3
%>
<style type="text/css">
<!--
.style2 {color: #FF0000; font-size: 12px; }
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style5 {font-size: 12px; color: #000000; }
.style6 {color: #000000}
-->
</style>
<table width="771" border="1" align="center" cellspacing="0" bordercolor="#FF00FF">
<tr class="style2">
<td width="39" height="26" bgcolor="#00FF00"><div align="center" class="style2">ID</div></td>
<td width="116" bgcolor="#00FF00"><div align="center" class="style2">用户名</div></td>
<td width="318" height="26" bgcolor="#00FF00"><div align="center" class="style2">内容</div></td>
<td width="56" bgcolor="#00FF00"><div align="center">操作</div></td>
</tr>
<%for i = 1 to rs.recordcount%>
<tr bgcolor="#00FFFF">
<td height="22"><div align="center" class="style5">
<div align="center"><%=i%></div>
</div></td>
<td height="22"><div align="center" class="style5">
<div align="center"><%=rs("用户名")%></div>
</div></td>
<td width="1000" style="word-break:break-all"><div align="center" class="style5">
<div align="left"><%=rs("内容")%></div></td>
<td height="22"><div align="center" class="style5">
<div align="center"><a href="del.asp?id=<%=rs("id")%>" class="style6">删除</a></div>
</div></td>
</tr>
<%
rs.movenext
next
%>
</table>
<%end if
%>
这里的<%for i = 1 to rs.recordcount%>是循环显示数据库里的信息
不知道这个答案能不能帮你解决你的问题!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询