上代码吧:
首先a.asp的代码如下:
<!--#include file="conn.asp" -->
<HTML><HEAD><TITLE></TITLE>
<LINK href="style/main.css" type=text/css rel=stylesheet>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width="49%"><div>
<iframe name="frmc" src="c.asp" width="100%" frameborder="0" ></iframe></div></td>
<td width="2%"> </td>
<td width="49%"><div>
<iframe name="frmd" src="d.asp" width="100%" frameborder="0" ></iframe></div></td>
</tr>
</table>
</body>
</html>
c.asp的代码如下:
<!--#include file="conn.asp" -->
<HEAD>
<TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META name="keywords" content="">
<META name="description" content="" >
</HEAD>
<BODY>
<%
set rs=server.createobject("adodb.recordset")
sql1="select * from bao where fabu=1
sql1=sql1&" order by date desc, id desc"
'response.write sql
'response.End
session("sql")=sql1
rs.open sql1,conn,2,2
rs.pagesize=MaxPerPage
%>
<% j=1
if not (rs.eof or err) then rs.move (page-1)*maxPerPage
do while not rs.eof
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="7%" align="right">◎</td>
<td width="5%"><span style="font-size:12px">√</span></td>
<td><%=rs("introduce")%></td>
</tr>
<%
j=j+1
if j>maxperpage then exit do
rs.moveNext
loop
dim k
k=(j-1) mod num_row
'response.write j
'response.write "k="&k
if not (k=0) then
response.write "<td colspan="&(num_row-k)&" width="&(cint(100/num_row)*(num_row-k))&"> </td>"
response.write "</tr>"
end if
rs.close
set rs=nothing
%>
</table>
</body>
</html>
d.asp的代码如下:
<!--#include file="conn.asp" -->
<HEAD>
<TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META name="keywords" content="">
<META name="description" content="" >
</HEAD>
<BODY>
<%
set rs=server.createobject("adodb.recordset")
sql1="select * from bao where fabu=2
sql1=sql1&" order by date desc, id desc"
'response.write sql
'response.End
session("sql")=sql1
rs.open sql1,conn,2,2
rs.pagesize=MaxPerPage
%>
<% j=1
if not (rs.eof or err) then rs.move (page-1)*maxPerPage
do while not rs.eof
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="7%" align="right">◎</td>
<td width="5%"><span style="font-size:12px">√</span></td>
<td><%=rs("introduce")%></td>
</tr>
<%
j=j+1
if j>maxperpage then exit do
rs.moveNext
loop
dim k
k=(j-1) mod num_row
'response.write j
'response.write "k="&k
if not (k=0) then
response.write "<td colspan="&(num_row-k)&" width="&(cint(100/num_row)*(num_row-k))&"> </td>"
response.write "</tr>"
end if
rs.close
set rs=nothing
%>
</table>
</body>
</html>