jQuery Ajax缓存问题
在使用jQuery 的Ajax加载数据是 如果使用get方式传递参数则存在一下问题
firefox下传递数据正常
ie下则会出现缓存问题
解决方法:
1、http://yourwebsite?parseInt(Math.random() * 1000) 在url后面加上一个随即数,这样每次发送的就不一样了,而且不影响你的功能.
2、使用post传递参数
相关文档:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>xmlhttprequest ajax demo</title>
<mce:script type ="text/javascript" language ="javascript" ><!--
var req; //定义变量,用来创建xmlhttprequest对象
function creatReq() // 创建xmlhtt ......
var x,y;
//这是一个通过AJAX取得提示信息的方法
function over(noteContent){
//记录事件发生时的鼠标位置
x = event.clientX;
y = event.clientY;
//显示工具提示
document.getElementById(" ......
Ajax中的返回状态readyState和status,原来没有重视过这两者的关系,结果今天写代码时出差错了。我的原代码为:
function requestSome()
{
url=......
xmlHttpRequest.open....
xmlHttpRequest.onreadystatechange = function responseSome();
xmlHttpRequest.send....
}
function resp ......
function saveObj(){
var userName = document.getElementById("userName").value;
checkUserName(userName);
}
//使用ajax实现页面无刷新功能;
var xmlHttpRequest;
function createXMLHttpRequest(){
if(windo ......