![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
IE
youcey
Keep calm and carry on
展开
-
让forEach兼容IE8
项目开发中遇到的问题,大概记录一下: 解决办法: 在使用forEach之前添加该代码块: //官网查询的兼容代码段 // Production steps of ECMA-262, Edition 5, 15.4.4.18 // Reference: http://es5.github.io/#x15.4.4.18 if (!Array.prototype.forEach) { Ar原创 2017-12-29 10:16:24 · 2165 阅读 · 6 评论 -
让indexOf兼容IE8
项目开发中遇到的问题,很奇怪的需求,为什么要兼容IE8,但是领导要求,没办法! 解决办法: 在使用indexOf之前添加下面代码段: if (!Array.prototype.indexOf){ Array.prototype.indexOf = function(elt /*, from*/){ var len = this.length >>> 0; var fro原创 2017-12-29 10:20:53 · 676 阅读 · 0 评论