您的位置:首页 > 编程语言

关于分页显示中的换行显示原理代码

2007-07-15 09:54 369 查看
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<%
Dim rs
Set rs=server.CreateObject("adodb.recordset")
sql="select * from test1 "
rs.open sql ,conn,1
%>
<body>
<table width="80%" border="1" cellpadding="1" cellspacing="5" bordercolor="#9900FF" bgcolor="#0000FF">
<tr>
<%
i=0
do while not rs.eof
if i mod 2<>0 then
%>
<td bgcolor="#FFFFFF"><%=rs(0)%><%=rs(1)%></td>
<%else%>
</tr>
<tr>
<td bgcolor="#FFFFFF"><%=rs(0)%><%=rs(1)%></td>
<%
end if
i=i+1
rs.movenext
loop
rs.close
conn.close
%>
</tr>
</table>
<p> </p>
<table width="43%" border="1" align="center" cellpadding="1" cellspacing="0">
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>5</td>
<td>6</td>
</tr>
</table>
<p> </p>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: