buzzard
(家有咸妻)
高级会员

老不死的会员
UID 19416
精华
0
积分 866
帖子 1137
金钱 866 喜悦币
威望 0
人脉 0
阅读权限 50
注册 2003-4-7
状态 离线
|
[推荐阅读] 中小型的网站使用PHP用那个操作系统好那?
xmlHttp
如
层
<div id='flag1'>
</div>
<span onclick="DivContent('div.php','flag1')">刷新层</span>
<script>
function DivContent(strUrl,objDiv){
var Element= this;
var xmlHttp = new ActiveXObject("Msxml2.XMLHTTP.5.0");
xmlHttp.open("GET",strUrl, true);
xmlHttp.onreadystatechange = function () {
switch (xmlHttp.readyState) {
case 3 :
objDiv.innerHTML = loadStr;
break;
case 4 :
if (xmlHttp.status == 200){
objDiv.innerHTML=xmlHttp.responseBody;
}
}
}
xmlHttp.setRequestHeader("Content-Type","text/xml")
xmlHttp.send(null);
}
</script>
层里的内容div.php
这样应该满足搂住的要求
div.php注意
加上
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
去除缓存
|
|