<html>
<head>
<title>ajax分页效果</title>
<style>
<!--
body {font-size:12px;}
input {margin:5px 5px 0;}
form {margin-bottom:20px;padding:10px;}
div#content div#pager {font-family:Courier New;padding:10px;}
table {margin:0 10px;}
td {padding:6px;font-size:12px;}
a {color:#333;}
span#tip{
margin-left:30px;background-color:#fff;
color:#fff;padding:3px;display:none;}
-->
</style>
</head>
<body>
<form name="form1">
查询:<input type="text" id="search" name="search"> <input type="button" value="查询" onclick="getPage(1)"><br><br>
<span id="tip">正在加载...</span>
</form>
<div id="content"></div>
</body>
</html>
<script>
<!--
var content=document.getElementById("content");
var tip=document.getElementById("tip");
function getPage(page){
tip.style.display="inline";
var search=document.form1.search.value;
var xmlhttp;
try
{
xmhhttp=new ActiveXObjec("Msxml2.XMLHTTP");
}
catch (e)
{
try{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){
try{
xmlhttp=new XMLHttpRequest();
}
catch (e){}
}
}
xmlhttp.onreadystatechange=function()
{
if(4==xmlhttp.readyState)
{
if(200==xmlhttp.status)
{
document.getElementById("tip").innerHTML=xmlhttp.responseText;
}
else
{
alert(xmlhttp.status);
}
}
}
var url="search.asp?search="+escape(search)+"&page="+page+"&t="+new Date().getTime();
xmlhttp.open("get",url);
xmlhttp.send(null);
}
-->
</script>
没有合适的资源?快使用搜索试试~ 我知道了~
源代码-Ajax 无刷新分页代码.zip
共4个文件
asp:2个
mdb:1个
htm:1个
0 下载量 15 浏览量
2024-05-06
16:35:01
上传
评论
收藏 10KB ZIP 举报
温馨提示
源代码-Ajax 无刷新分页代码.zip
资源推荐
资源详情
资源评论
收起资源包目录
源代码-Ajax 无刷新分页代码.zip (4个子文件)
132676182086701676
ajax_fpage
ajax_fpage.mdb 136KB
conn.asp 221B
index.htm 2KB
search.asp 1KB
共 4 条
- 1
资源评论
快乐无限出发
- 粉丝: 1155
- 资源: 7299
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功