1
我正在使用Knockout JavaScript库,并遇到此问题:我无法更改IE7中的单选按钮选择。如何更改IE 7中的单选按钮选择?
例如,在我的页面上,我无法使用IE 7更改单选按钮的方式,即controlTypes example。
有没有解决这个问题?
我正在使用Knockout JavaScript库,并遇到此问题:我无法更改IE7中的单选按钮选择。如何更改IE 7中的单选按钮选择?
例如,在我的页面上,我无法使用IE 7更改单选按钮的方式,即controlTypes example。
有没有解决这个问题?
我找到了解决方案。通过为该组中的所有单选按钮添加具有相同值的名称属性(name="planetType"
,请参阅下文),IE也将很高兴...
<label><input type="radio" value="all" data-bind="checked: typeToShow" name="planetType" />All</label>
<label><input type="radio" value="rock" data-bind="checked: typeToShow" name="planetType"/>Rocky planets</label>
<label><input type="radio" value="gasgiant" data-bind="checked: typeToShow" name="planetType"/>Gas giants</label>