您的位置:首页 > Web前端 > JavaScript

ExtJS 单选按钮组RadioGroup在IE浏览器中显示不出来的问题

2012-09-24 09:42 489 查看

问题描述

创建一个单选按钮组new Ext.form.RadioGroup,在火狐浏览器Firefox下能正常显示,但是在IE浏览器中显示不出来。
var typeRadioGroupCtrl = new Ext.form.RadioGroup({
id: 'typeRadioGroup',
items: [{ boxLabel: '噪声', name: 'dataType', inputValue: 'noise', width: 60,
checked: true},
{boxLabel: '空气质量', name: 'dataType', inputValue: 'air', width: 80},
]
});


解决办法

问题貌似出在上面的items属性内容(单选按钮项)的简写方式上, 将单选按钮项一个一个的创建出来(new Ext.form.Radio),然后放到items中。在IE浏览器下面就可以出来了。
var noiseRadio = new Ext.form.Radio({
name: 'dataType',
boxLabel: '噪声',
inputValue: 'noise',
width: 60,
checked: true
});

var airRadio = new Ext.form.Radio({
name: 'dataType',
boxLabel: '空气质量',
inputValue: 'air',
width: 80
});

var typeRadioGroupCtrl = new Ext.form.RadioGroup({
id: 'typeRadioGroup',
items: [noiseRadio, airRadio]
});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: