$("#submitbutton").button().click(function() {
var request = $.ajax({
type: "post",
url: "mmm.php",
data:"abc=abcdefghijklmnopqrstuvwxyz",
success:function(data){ alert("success: " +data); },
error:function(data){ alert("error "+data); },
statusCode:{
200:function(){alert("200");},
304:function(){alert("304");},
404:function(){alert("404");}},
isModified:function(){alert("Something was modified");}
});
IE9上的这个帖子回复正确。在 chrome 上,它会生成带有以下内容的错误警报:“error [Object][Object]”
Chrome 控制台显示没有错误,服务器回复:
对于 IE:
10.0.0.4 - - [22/Jul/2012:18:00:22 +0300] "GET /development-bundle/ui/jquery.ui.button.js HTTP/1.1" 200 11342 "http://xxxx.xxxx .net/first.html" "Mozilla/4.0(兼容;MSIE 7.0;Windows NT 6.1;WOW64;Trident/5.0;SLCC2;.NET CLR 2.0.50727;.NET CLR 3.5.30729;.NET CLR 3.0.30729;媒体中心 PC 6.0;.NET4.0C)"
对于铬:
10.0.0.4 - - [22/Jul/2012:18:08:34 +0300] “GET /development-bundle/ui/jquery.ui.button.js HTTP/1.1”304 - “http://xxxx.xxxxxx .net/first.html?” “Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11”
知道为什么 chrome 在“first.html”之后添加问号而 IE 没有吗?它会导致 apache 服务器返回 304,看起来 Chrome 是错误的
谢谢你