简体   繁体   English

页面可在Edge,Chrome和Firefox中运行,但不能在IE11中运行

[英]Page working in Edge, Chrome and Firefox but not IE11

I have a page that apparently works nicely in Firefox, Chrome, Edge but not in IE11 which some of the target users require: 我有一个页面显然可以在Firefox,Chrome,Edge中很好地工作,但是在某些目标用户要求的IE11中却不能:

https://www.sva.se/Maps/kattsalmonella/map.html https://www.sva.se/Maps/kattsalmonella/map.html

I get the error "Object does not support this property or method" at line 323, I have read this post: 我在第323行收到错误“对象不支持此属性或方法”,我已经阅读了这篇文章:

Getting error in IE11 for javascript array 在IE11中获取JavaScript数组错误

and suspect something similar is going on but can't identify the problem. 并怀疑正在发生类似情况,但无法确定问题所在。

A suggestion is to remove fill() from this code: 建议从以下代码中删除fill()

function getZoomData(){
    zoomTest= new Array(zoomKod.length).fill(0), zoomPos = new Array(zoomKod.length).fill(0), zoomNeg = new Array(zoomKod.length).fill(0);

    for(i in data2.features)
    {
        var dateparts = data2.features[i].properties["date"].split('-');
        var sampledate = new Date(dateparts[0], dateparts[1]-1);

        if(sampledate.getTime() >= minRange && sampledate.getTime() <= maxRange ){
            for(k in zoomKod){
                if(zoomKod[k] == data2.features[i].properties["NUTS_ID"]){
                    zoomTest[k] += data2.features[i].properties["samples"];
                    zoomPos[k] +=data2.features[i].properties["pos"];
                    zoomNeg[k] +=data2.features[i].properties["neg"];
                    break;
                }
            }
        }
    }
}

The solution was in this answer: 解决方案是在此答案中:

Object doesn't support property or method 'fill' 对象不支持属性或方法“填充”

and @dmitry 's comment. 和@dmitry的评论。

I loaded the polyfill.js code and it is now working properly in IE11. 我加载了polyfill.js代码,现在它在IE11中可以正常工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 promise function 在 Chrome 和 Firefox 中工作,但不在 IE Edge 和 IE11 中 - promise function working in Chrome and Firefox but not in IE Edge and IE11 jQuery 不能在 IE11 上运行,但可以在 Chrome、Firefox 和 Edge 上运行? - jQuery not working on IE11 but working on Chrome, Firefox and Edge? JavaScript 行为差异:IE11/Edge 与 Chrome/Firefox - JavaScript Behavior difference: IE11/Edge vrs Chrome/Firefox 为什么页面微调器JavaScript在IE11中不起作用,但在Chrome和FireFox中起作用? - Why is page spinner JavaScript not working in IE11, but works in Chrome and FireFox? Chrome可在Chrome,Opera和Edge上使用Javascript,但在FireFox或IE 11上则无法使用 - Javascript working on Chrome & Opera & Edge, but not on FireFox or IE 11 文件输入的输入事件和/或更改事件在Chrome和Opera中触发,但在Firefox,Edge或IE11中不触发 - File input's input event and/or change event fire in Chrome and Opera, but not in Firefox, Edge or IE11 如何使用TypeScript for IE11 / Edge / Chrome / Firefox编译Web组件? - How can I get Web Components to compile with TypeScript for IE11/Edge/Chrome/Firefox? Edge和IE11中的CSS转换无效 - CSS transitions in Edge and IE11 not working Bxslider在Firefox和IE11中不起作用 - Bxslider not working in Firefox and IE11 Javascript“切换器”功能不适用于IE9或IE10(IE8具有后备功能),但适用于IE11,Chrome,Firefox - Javascript “toggler” function not working in IE9 or IE10 (IE8 has a fallback in place) but working in IE11, Chrome, Firefox
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM