分页问题
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--include file="top.asp"-->
<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script language="javascript">
<!--
function gopage() {
var pagenum=document.form1.page.value;
//alert(pagenum);
location.href=" ?currentpage="+pagenum;
}
//-->
</script>
<script language=javascript>
function check()
{
if (document.form1.name.value=="")
{alert("请填写用户名!")
document.form1.name.focus()
return false
}
if (document.form1.address.value=="")
{alert("请填写单位!")
document.form1.address.focus()
return false
}
var str=form1.web.value;
//在JavaScript中,正则表达式只能使用"/"开头和结束,不能使用双引号
//判断URL地址的正则表达式为:http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?
//下面的代码中应用了转义字符"\"输出一个字符"/"
if(!/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/.test(str))
{
alert("网址格式不对,请重新输入!");
document.form1.web.focus()
return false;
}
email=form1.mail.value;
if(!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(email))
{
alert("mail格式不对,请重新输入");
form1.mail.focus();
return false;
}
if (document.form1.title.value=="")
{alert("请填写留言标题!")
document.form1.title.focus()
return false
}
if (document.form1.phone.value=="")
{alert("请填写电话号码!")
document.form1.phone.focus()
return false
}
if (document.form1.QQ.value=="")
{alert("请填写QQ/MSN号码!")
document.form1.QQ.focus()
return false
}
if (document.form1.content.value=="")
{alert("请填写留言内容!")
document.form1.content.focus()
return false
}
if (document.form1.content.value.length>600)
{ window.alert("留言内容不能超过600个字,当前有"+document.form1.content.value.length+"个")
window.document.form1.content.select()
return false
}
return true
}
</script>
<meta http-equiv="Content-Type" c>
<title>无标题文档</title>
<style type="text/css">
<!--
.tdd {
border-bottom-width: 1px;
border-bottom-style: dotted;
border-bottom-color: #000000;
font-size: 14px;
}
td {
font-size: 12px;
}
.style5 {color: blue}
.style9 {color: #CC0000}
body {
background-image: url(images/bg_001.jpg);
}
-->
</style>
</head>
<body>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="183" height="216" valign="top" bgcolor="#EAEEEF" scope="col"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#EAEEEF">
<tr>
<th height="19" colspan="2" scope="col"><img src="images/gongsi03.gif" width="183" height="31"></th>
</tr>
<tr>
<td width="13%"><div align="center"><img src="images/ti.gif" width="14" height="12"></div></td>
<td width="87%" height="20"></a><a href="indexe.asp">添加留言</a></td>
</tr>
<tr>
<td width="13%"><div align="center"><img src="images/ti.gif" width="14" height="12"></div></td>
<td width="87%" height="20"></a><a href="indexek.asp">查看留言</a></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#EAEEEF">
<tr>
<th scope="col"><img src="images/gongsi11r2c1.gif" width="178" height="26"></th>
</tr>
<%
dim myself'本页地址
myself = request.servervariables("path_info")
dim rst,sqlt
set rst=server.CreateObject("adodb.recordset")
sqlt="select id,title from gsjj where classid=2"
rst.open sqlt,conn,1,1
if rst.eof or rst.bof then
response.write "<p align=center>No Records!</p>"
end if
do while not rst.eof
%>
<tr>
<td height="20" class="tdd"> >> <a href="indexa.asp?id=<%=rst("id")%>&name=<%=rst("title")%>"><%=rst("title")%></a></td>
</tr>
<%
rst.movenext
loop
rst.close
set rst=nothing
%>
<tr>
<td> </td>
</tr>
</table></td>
<td width="2" bgcolor="#999999" scope="col"></td>
<td width="587" valign="top" scope="col"><div align="right">
<div align="right">
<table width="101%" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<th width="8%" scope="col"><img src="images/left.gif" width="46" height="31"></th>
<td width="91%" height="19" background="images/gongsi_06.gif" scope="col"><div align="left"> 留言内容</div></td>
<th width="1%" scope="col"><div align="left"><img src="images/right.gif" width="8" height="31"></div></th>
</tr>
<tr align="left" valign="top" >
<td height="185" colspan="3"><%
dim rs,sql
set rs=server.CreateObject("adodb.recordset")
sql="select * from liuyan "
rs.open sql,conn,1,3
if rs.eof then
response.write "<p align='center'>暂时没有留言信息!</p>"
response.End()
end if
dim currentpage,records,pages,p,page
' currentpage = trim(Request.QueryString("page"))'变量是跳转页面时的值
'currentpage=clng(request("page"))
if p="" then
rs.PageSize=5
pages=rs.pagecount
records=rs.recordcount
currentpage=clng(trim(Request.QueryString("page")))
if currentpage="" or currentpage<1 then currentpage=1
currentpage=cint(currentpage)
if currentpage>pages then currentpage=pages
rs.absolutepage=currentpage
else
currentpage=1
records=0
pages=1
end if
%>
<table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#F4F6FC">
<%
dim j
j=1
rs.move (currentpage-1)*rs.pagesize,1
for i=1 to rs.pagesize
%>
<tr background="c4c4c4">
<td width="20%" height="18"><font color="#FF0000">[NO
<% =j %>
]</font></td>
<td width="80%" background="c4c4c4">留言主题:<span class="style5">
<% =rs("subject") %>
</span></td>
</tr>
<tr bgcolor="#Cfcfcf">
<td height="18" bgcolor="#FFFFFF"> 留言者:
<% =rs("name") %></td>
<td rowspan="4" align="left" valign="top" bgcolor="#FFFFFF"><% =rs("content") %></td>
</tr>
<tr background="c4c4c4">
<td height="16"> 来自:<%=left(rs("ip"),(len(rs("ip"))-1))+"*"%></td>
</tr>
<tr bgcolor="#Cfcfcf">
<td height="16" bgcolor="#F6F8F7"> 您的邮箱:<a href="mailto:<%=rs("email")%>"><img src="images/email.gif" width="20" height="20" border="0" title="<%=rs("email")%>"></a></td>
</tr>
<tr>
<td height="16"> 个人主页:<a href="<%=rs("site")%>"><img src="images/admin_home.gif" width="17" height="16" border="0"></a></td>
</tr>
<tr bgcolor="#Cfcfcf" background="c4c4c4">
<td bgcolor="#FFFFFF"> 管理员回复:</td>
<td align="left" valign="top" bgcolor="#FFFFFF"><span class="style9">
<%
if rs("content1")<>"" then
response.write rs("content1")
else
response.Write ("等待管理员的回复中......")
end if
%>
</span></td>
</tr>
<%
rs.movenext
j=j+1
if rs.eof then exit for
next
%><form name="form1" method="post" action="">
<tr background="c4c4c4">
<td height="39" colspan="2"><div align="right"> >>>
<%
if CurrentPage<2 then
response.write "首页 上一页"
else %>
<a href="indexek.asp?currentpage=1">首页</a> <a href="indexek.asp?currentpage=<%=(currentpage-1)%>">上一页</a>
<% end if
if pages-currentpage<1 then
response.write "下一页 尾页"
else %>
<a href="indexek.asp?currentpage=<%=(currentpage+1)%>">下一页</a> <a href="indexek.asp?currentpage=<%=rs_lar.pagecount%>">尾页</a>
<%end if%>
页次:<%=currentpage%>/<%=pages%>页 共有<%=records%>个信息 <%=rs.pagesize%>信息/页 转到
<input name="page" type="text" value="<%=currentpage%>" size="3">
页
<input name="image" type='image' style="CURSOR: hand" src="images/goto.gif" alt="页面跳转" width="16" height="16">
</div></td>
</tr>
</form>
</table></td>
</tr>
</table>
</div>
</div></td>
</tr>
</table>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><hr align="center" size="1"></td>
</tr>
<tr>
<td height="18"><div align="center">版权所有 @ 2008 衣都资讯 </div></td>
</tr>
<tr>
<td height="18"><div align="center"> 电话:86-0371-69079311 传真:86-0371-69118393 电子邮箱:yduzixun@sina.com</div></td>
</tr>
<tr>
<td height="18"><div align="center">24小时服务手机号:13613853676 </div></td>
</tr>
<tr>
<td height="18"><div align="center">访问统计:<a href="count/show.asp"><img src="images/cc_icon.gif" width="18" height="18" border="0"></a></div></td>
</tr>
</table>
<map name="Map">
<area shape="rect" coords="42,6,110,23" href="index.asp">
</map>
<map name="Map2">
<area shape="rect" coords="22,6,90,23" href="#">
</map>
</body>
</html>
问题是现在在文本框里输入数字时,点击箭头没有反应.
我上传的去的附件是可以在iis下看到具体的结果的.
如果有那位朋友会的话,可以帮着改一下,本人不胜感激.
[ 本帖最后由 cfannb 于 2008-6-25 13:33 编辑 ]
附件: 您所在的用户组无法下载或查看附件