Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/473.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
javascript在chrome中工作,但在ie9中不工作_Javascript_Jquery_Extjs - Fatal编程技术网

javascript在chrome中工作,但在ie9中不工作

javascript在chrome中工作,但在ie9中不工作,javascript,jquery,extjs,Javascript,Jquery,Extjs,这用于更新字段中显示的芯片,这段代码在除ie9之外的所有浏览器上运行,当我试图根据输入获取新字段的输出时,我只是在字段中没有可见值,当我单击其他字段时,它会将我重定向到模式页面,在那里我可以看到值,也无法在dom中看到任何值或在控制台中看到任何错误 updateChips: function() { var me = this, clientWidth, totalChipWidth = 0, overflowCount = 0,

这用于更新字段中显示的芯片,这段代码在除ie9之外的所有浏览器上运行,当我试图根据输入获取新字段的输出时,我只是在字段中没有可见值,当我单击其他字段时,它会将我重定向到模式页面,在那里我可以看到值,也无法在dom中看到任何值或在控制台中看到任何错误

updateChips: function() {
    var me = this,
        clientWidth,
        totalChipWidth = 0,
        overflowCount = 0,
        overflowText = '';

    if (!this.rendered) {
        this.on('render', function() {
            me.updateChips();
        });
        return;
    }

    if (!this.inputEl) {
        return;
    }

    this.inputEl.update('');
    clientWidth = this.inputEl.dom.clientWidth - 50;
    Ext.Array.each(this.getInternalValue(), function(val) {
        var chip = me.inputEl.appendChild({
            tag: 'div',
            cls: 'b5chip',
            children: [
                {
                    tag: 'span',
                    cls: 'label',
                    children: val.title,
                    title: val.title
                }, {
                    tag: 'span',
                    cls: 'b5chipdelete',
                    children: B5.b5theme.Glyphs.asHtml(
                        B5.b5theme.Glyphs.CLOSE
                    )
                }
            ]
        });

        totalChipWidth += chip.dom.clientWidth;
        if (totalChipWidth > clientWidth) {
            chip.destroy();
            overflowCount += 1;
            overflowText = overflowText + val.title + '\n';
            return;
        }

        chip.down('.b5chipdelete').on('click', function(e) {
            var currentValue = me.getInternalValue(),
                recordId = val.id,
                values = Ext.Array.filter(currentValue, function(value) {
                    return value.id !== recordId;
                });
            me.setValue(values);

            e.stopPropagation();
        });
    });

    if (overflowCount) { 
        var chip = me.inputEl.appendChild({
            tag: 'div',
            cls: 'b5overflowchip',
            children: [
                {
                    tag: 'span',
                    cls: 'label',
                    children: '+' + overflowCount,
                    title: overflowText
                }
            ]
        });
    }
},

您在控制台中看到任何错误吗?@Taplar控制台中没有显示任何错误