搜索 |
$.ajax({
url : "http://**.**.**.**/test/Tubiao/shuju.html",
method : "post",
cache : false,
timeout : 20000,
contentType: 'text/plain',
dataType : 'json',
data : "",
error : function(XHR, textStatus, errorThrown) {
},
success : function(data) {
//处理代码
}
});
需要加载额外的js
为了在IE 浏览器中使用 XDomainRequest,以下是必须的,
Only GET or POSTWhen POSTing, the data will always be sent with a Content-Type
of text/plain
Only HTTP
or HTTPS
Protocol must be the same scheme as the calling page
Always asynchronous
来源http://www.jianshu.com/p/4f04013b8b91