IE8 支持jquery

IE8 支持jquery

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<%--<meta http-equiv="X-UA-Compatible" content="IE=7"></meta>--%>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="//cdn.bootcss.com/html5shiv/3.7.0/html5shiv.js"></script>
<script src="//cdn.bootcss.com/respond.js/1.3.0/respond.min.js"></script>
<script src="//cdn.bootcss.com/jquery/1.9.0/jquery.min.js"></script>
<![endif]-->

--jQuery在IE8上使用时提示“对象不支持此属性或方法”
 如果在引入jquery的时候,看到ie8的控制台报错:“某某对象不支持此属性或方法”,一般是因为jquery的版本问题,要引入1.9.1以下的版本,如果同时使用了bootstrap框架,那只能引入1.9.1,因为bootstrap最低就支持到1.9.1。


//IE8 不支持foreach
if (typeof Array.prototype.forEach != 'function') {
    Array.prototype.forEach = function(callback){
        for (var i = 0; i < this.length; i++){
            callback.apply(this, [this[i], i, this]);
        }
    };
}

IE8中使用百度图表的话

一般IE8报错 其他浏览器正常 都是逗号的问题,把最后一个属性后边的逗号去掉即可。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值