jquery  使用get方式提交数据 ie8只会提交一次。由于缓存问题,提交的路径我添加的随机数,但还是只能提交一次。这该怎么解决???

解决方案 »

  1.   

    试试看
    url = "xxx.xx?" + escape(new Date()) 
      

  2.   

    使用post方式进行连续数据提交
    <script language="JavaScript">
    function ccc(){
    $.post("test.php", {Action: "post", Name: "lulu" },
      function (data, textStatus){
        $("div").html(data.name);
        }, "json");
      }
    </script><input type="button" id="ccc" value="tijiao" onclick="ccc()">
    IE8的确问题多多,建议文件头加一句
    <meta http-equiv="X-UA-Compatible" content="IE=7" >
    强制网页以兼容IE7方式解析
      

  3.   

     function init(){
    var url="statServlet?"+Math.random();
    $.get(url,{ip:'<%=request.getRemoteHost()%>',website:escape(document.referrer),urlpage:this.location.href,agent:navigator.userAgent,random:Math.random()});
    alert('success');
       }
      

  4.   

    $.get('<%=basePath%>setOptForEMAS.do?data=<%=new Date()%>",....我是这么弄得!暂时 没发现什么问题
      

  5.   

    $.ajaxSetup ({    cache: false //关闭AJAX相应的缓存});