主题:两问题,希望高手帮助分析一下,谢谢!
问题一:
为什么全选点了没有反应?
问题二:
虽然分了页,但是总是显示第一页,点第二页也不挑转.
麻烦高手指点一下,万分谢谢!
代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!-- #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>
<style type="text/css">
<!--
.STYLE1 {
font-size: 36px;
font-weight: bold;
font-family: "楷体_GB2312";
}
a:link
{
color:#000000; text-decoration:none;
}
a:active
{
color:#000000; text-decoration:none;
}
a:visited{
color:#000000;
text-decoration:none;
}
a:hover{
color: #00CC00;
text-decoration:none
}
-->
</style>
</head>
<body bgcolor="#008080">
<P align="center"><img src="image/TOP.jpg" /></P>
<%
if session("mode")=no then
response.Write("<script>alert('请你先登陆!');onclick=(location='index.asp');</script>")
end if
%>
<span class="STYLE1"><div align="center">管理界面</div></span>
<table width="200">
<tr>
<td align="center"><a href="usermanager.asp">人员管理</a></td>
</tr>
<tr>
<td align="center">记录管理</td>
</tr>
</table>
<table width="780" align="center" border="1" cellpadding="0" cellspacing="0" bordercolor="#666666">
<tr>
<td align="center">选择</td>
<td align="center">学号</td>
<td align="center">记录标题</td>
<td align="center">提交时间</td>
<td align="center">下载</td>
</tr>
<%
set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from content order by id desc"
rs.open sqlstr,conn,1,1
if rs.eof or rs.bof then
response.Write("<script> alert('没有记录');location.href='add.asp';</script>")
else
counts=15
rs.pagesize=counts
allpages=rs.pagecount
page=request.QueryString("page")
if isempty(page) or cint(page) then
page=1
elseif cint(page)>=allpages then
page=allpages
end if
rs.absolutepage=page
do while(not rs.eof) and counts>0
%>
<tr>
<td align="center" width="5%"><input name="check" type="checkbox" /></td>
<td align="center" width="5%"><%=rs("xh")%></td>
<td align="center" width="65%"><a href="mshow.asp?id=<%=rs("id")%>"><%=rs("title")%></a></td>
<td align="center" width="20%"><%=rs("time")%></td>
<td align="center" width="5%"><a href="download/<%=rs("id")%>.doc"><img src="image/home04.jpg" width="16" height="16"/></a></td>
</tr>
<%
counts=counts-1
rs.movenext
if rs.eof then exit do
loop
end if
%>
<tr>
<td colspan="3">共有<%=rs.recordcount%>条记录</td>
<td colspan="2">
<%
for j=1 to rs.pagecount
response.Write("<a href='lwmanager.asp?page="&j&"'>["&j&"]</a>")
next
rs.close
set rs=nothing
%>
</td>
</tr>
</table>
</body>
</html>
为什么全选点了没有反应?
问题二:
虽然分了页,但是总是显示第一页,点第二页也不挑转.
麻烦高手指点一下,万分谢谢!
代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!-- #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>
<style type="text/css">
<!--
.STYLE1 {
font-size: 36px;
font-weight: bold;
font-family: "楷体_GB2312";
}
a:link
{
color:#000000; text-decoration:none;
}
a:active
{
color:#000000; text-decoration:none;
}
a:visited{
color:#000000;
text-decoration:none;
}
a:hover{
color: #00CC00;
text-decoration:none
}
-->
</style>
</head>
<body bgcolor="#008080">
<P align="center"><img src="image/TOP.jpg" /></P>
<%
if session("mode")=no then
response.Write("<script>alert('请你先登陆!');onclick=(location='index.asp');</script>")
end if
%>
<span class="STYLE1"><div align="center">管理界面</div></span>
<table width="200">
<tr>
<td align="center"><a href="usermanager.asp">人员管理</a></td>
</tr>
<tr>
<td align="center">记录管理</td>
</tr>
</table>
<table width="780" align="center" border="1" cellpadding="0" cellspacing="0" bordercolor="#666666">
<tr>
<td align="center">选择</td>
<td align="center">学号</td>
<td align="center">记录标题</td>
<td align="center">提交时间</td>
<td align="center">下载</td>
</tr>
<%
set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from content order by id desc"
rs.open sqlstr,conn,1,1
if rs.eof or rs.bof then
response.Write("<script> alert('没有记录');location.href='add.asp';</script>")
else
counts=15
rs.pagesize=counts
allpages=rs.pagecount
page=request.QueryString("page")
if isempty(page) or cint(page) then
page=1
elseif cint(page)>=allpages then
page=allpages
end if
rs.absolutepage=page
do while(not rs.eof) and counts>0
%>
<tr>
<td align="center" width="5%"><input name="check" type="checkbox" /></td>
<td align="center" width="5%"><%=rs("xh")%></td>
<td align="center" width="65%"><a href="mshow.asp?id=<%=rs("id")%>"><%=rs("title")%></a></td>
<td align="center" width="20%"><%=rs("time")%></td>
<td align="center" width="5%"><a href="download/<%=rs("id")%>.doc"><img src="image/home04.jpg" width="16" height="16"/></a></td>
</tr>
<%
counts=counts-1
rs.movenext
if rs.eof then exit do
loop
end if
%>
<tr>
<td colspan="3">共有<%=rs.recordcount%>条记录</td>
<td colspan="2">
<%
for j=1 to rs.pagecount
response.Write("<a href='lwmanager.asp?page="&j&"'>["&j&"]</a>")
next
rs.close
set rs=nothing
%>
</td>
</tr>
</table>
</body>
</html>