【发布时间】:2011-05-22 23:59:44
【问题描述】:
我正在使用 Knockout javascript 库,我遇到了这个问题:我无法更改 IE7 中的单选按钮选择。
例如,在我的页面上,我无法像 controlTypes example 那样使用 IE 7 更改单选按钮选择。
这个问题有解决办法吗?
【问题讨论】:
我正在使用 Knockout javascript 库,我遇到了这个问题:我无法更改 IE7 中的单选按钮选择。
例如,在我的页面上,我无法像 controlTypes example 那样使用 IE 7 更改单选按钮选择。
这个问题有解决办法吗?
【问题讨论】:
我找到了解决方案。通过为组中的所有单选按钮添加具有相同值的名称属性(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>
【讨论】: