ASP代码显示信息 我只想就它显示5条信息怎么办啊
<%@LANGUAGE="VBScript"codepage="936"%><!--#includefile="conn.asp"--><%setrs=server.cr...
<%@LANGUAGE="VBScript" codepage="936"%>
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select uname,iname,email,guoji,shengao,hka from person order by id desc"
rs.open sql,conn,1,1
%>
<%do while not rs.eof%>
<style type="text/css">
<!--
.style1 {font-size: 12px}
.style2 {font-size: 12px; color: #FF0000; }
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>
<table width="944" height="18" border="0" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>
<td width="124" height="18"><span class="style1">姓名:<%=rs("uname")%></span></td>
<td width="119"><span class="style1">姓名2:<%=rs("iname")%></span></td>
<td width="250"><span class="style1">电子信箱:<%=rs("email")%></span></td>
<td width="155"><span class="style1">国家:<%=rs("guoji")%></span></td>
<td width="79"><span class="style1">身高:<%=rs("shengao")%></span></td>
<td width="217"><span class="style1">省份:<%=rs("hka")%></span></td>
</tr>
</table><%
rs.movenext
loop
%> 展开
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select uname,iname,email,guoji,shengao,hka from person order by id desc"
rs.open sql,conn,1,1
%>
<%do while not rs.eof%>
<style type="text/css">
<!--
.style1 {font-size: 12px}
.style2 {font-size: 12px; color: #FF0000; }
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>
<table width="944" height="18" border="0" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>
<td width="124" height="18"><span class="style1">姓名:<%=rs("uname")%></span></td>
<td width="119"><span class="style1">姓名2:<%=rs("iname")%></span></td>
<td width="250"><span class="style1">电子信箱:<%=rs("email")%></span></td>
<td width="155"><span class="style1">国家:<%=rs("guoji")%></span></td>
<td width="79"><span class="style1">身高:<%=rs("shengao")%></span></td>
<td width="217"><span class="style1">省份:<%=rs("hka")%></span></td>
</tr>
</table><%
rs.movenext
loop
%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询