asp 表格 显示问题 谢谢
循环显示数据库的内容我想让数据竖着显示但是现在总是横着显示现在显示的是123123123123123123123///////////////////我想显示的是:123...
循环显示 数据库的内容 我想 让数据竖着显示 但是现在总是 横着显示
现在显示的是 123 123 123 123 123 123 123
///////////////////
我想显示的是:
123
123
123
123
\\\\\\\\\\\\\\\\\\\\\\\\
我写的循环体 如下:
\\\\\\\\\\\\\\\\\
<!--#include file="Inc/conn.asp"-->
<%
Set Rs=server.createobject("adodb.recordset")
%>
<table width="149" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#E3E3E3">
<tr>
<%
sql="select top 5 * from Product where bigclassname='1' order by ArticleID desc"
rs.open sql,conn,1,1
do while not rs.eof
%>
<td align="center" valign="top">
<table width="119";word-break:break-all border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="130" height="24" align="center" style="width:110;word-break:break-all"><div align="left"><a href="1.asp?ArticleID=<%=rs("articleid")%>"><font color=#414141><%=rs("title")%></font></a></div></td>
</tr>
</table></td><br>
<%
rs.movenext
loop
rs.close%>
</tr>
</table>
\\\\\\\\\\\\\\\\\\\\\\
谢谢
></font></a></div></td>
后面个 </br> 没用 忘了去掉了 展开
现在显示的是 123 123 123 123 123 123 123
///////////////////
我想显示的是:
123
123
123
123
\\\\\\\\\\\\\\\\\\\\\\\\
我写的循环体 如下:
\\\\\\\\\\\\\\\\\
<!--#include file="Inc/conn.asp"-->
<%
Set Rs=server.createobject("adodb.recordset")
%>
<table width="149" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#E3E3E3">
<tr>
<%
sql="select top 5 * from Product where bigclassname='1' order by ArticleID desc"
rs.open sql,conn,1,1
do while not rs.eof
%>
<td align="center" valign="top">
<table width="119";word-break:break-all border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="130" height="24" align="center" style="width:110;word-break:break-all"><div align="left"><a href="1.asp?ArticleID=<%=rs("articleid")%>"><font color=#414141><%=rs("title")%></font></a></div></td>
</tr>
</table></td><br>
<%
rs.movenext
loop
rs.close%>
</tr>
</table>
\\\\\\\\\\\\\\\\\\\\\\
谢谢
></font></a></div></td>
后面个 </br> 没用 忘了去掉了 展开
2个回答
展开全部
<!--#include file="Inc/conn.asp"-->
<%
Set Rs=server.createobject("adodb.recordset")
%>
<table width="149" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#E3E3E3">
<tr>
<td align="center" valign="top">
<table width="119";word-break:break-all border="0" cellspacing="0" cellpadding="0">
<%
sql="select top 5 * from Product where bigclassname='1' order by ArticleID desc"
rs.open sql,conn,1,1
do while not rs.eof
%>
<tr>
<td width="130" height="24" align="center" style="width:110;word-break:break-all"><div align="left"><a href="1.asp?ArticleID=<%=rs("articleid")%>"><font color=#414141><%=rs("title")%></font></a></div></td>
</tr>
<%
rs.movenext
loop
rs.close
%>
</table></td><br>
</tr>
</table>
这样就可以了!
<%
Set Rs=server.createobject("adodb.recordset")
%>
<table width="149" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#E3E3E3">
<tr>
<td align="center" valign="top">
<table width="119";word-break:break-all border="0" cellspacing="0" cellpadding="0">
<%
sql="select top 5 * from Product where bigclassname='1' order by ArticleID desc"
rs.open sql,conn,1,1
do while not rs.eof
%>
<tr>
<td width="130" height="24" align="center" style="width:110;word-break:break-all"><div align="left"><a href="1.asp?ArticleID=<%=rs("articleid")%>"><font color=#414141><%=rs("title")%></font></a></div></td>
</tr>
<%
rs.movenext
loop
rs.close
%>
</table></td><br>
</tr>
</table>
这样就可以了!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询