jquery ajax在跨域访问post请求的时候,ie9以下无效(包括ie9)
来源:互联网 发布:人工蜂群算法优缺点 编辑:程序博客网 时间:2024/05/16 18:59
1. 设置浏览器安全属性,启用【通过域访问数据源】选项,如图:
2.调用ajax方法时,设置crossDomain为相反的值。原文链接:https://bugs.jquery.com/ticket/12097
<!DOCTYPE html>
<html>
<head>
<title>jQuery CORS in IE7 - IE10</title>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script>
$(document).ready(function() {
$.ajax({
url: "http://dreamfactorysql.cloudapp.net/API/index.php",
dataType: "text",
async: true,
type: 'GET',
cache: false,
crossDomain: true == !(document.all),
success: function(txt) {
alert(txt);
}
});
});
</script>
</head>
<body>
IE7 thru IE10 CORS Example Using jQuery
</body>
</html>
0 0
- jquery ajax在跨域访问post请求的时候,ie9以下无效(包括ie9)
- 解决jquery ajax在跨域访问post请求的时候,ie9以下无效(包括ie9)的问题
- IE9版本以下ajax 跨域问题解决
- IE9下jquery Ajax跨域请求问题
- 解决ie9以下的跨域问题
- ie9及以下 Ajax跨域阻止执行
- ajax 在IE9浏览器下不发送请求的解决方法
- 在ie9以下的版本placeholder显示
- ie9 ajax 跨域请求不了 提交为空 jquery-ajaxtransport-xdomainrequest
- 神奇的IE9,Ajax请求缓存问题
- requestAnimationFrame()请求动画帧的兼容IE9及以下写法
- 判断ie9以下的内核阻止访问内容。
- IE9以下的兼容问题解决方案
- jQuery 2.x 不支持IE9以下的IE浏览器
- jQuery的validate 在ie9和火狐下能用 在ie8下无效解决方法。
- echarts 画的图表在ie9以下不能正常显示
- webuploader在ie9以下返回失败
- IE9 IE8 Ajax跨域问题
- 自实现简单线程池
- Vuex初探之旅
- JCF treeset的用法实例
- 构建基于Jenkins + Github的持续集成环境
- [leetcode]215. Kth Largest Element in an Array
- jquery ajax在跨域访问post请求的时候,ie9以下无效(包括ie9)
- 一对一 一对多 多对多
- 初步认识:jqGrid
- $(document).height()与$(window).height()
- leetcode题解-3. Longest Substring Without Repeating Characters
- Android 混合开发 的一些心得。
- 虚拟网桥和网卡的轮训工作
- CCF网络延时---求树中两个最远结点的距离
- oracle 12c 智能闪存缓存(smart flash cache)