我正在使用Knockout javascript库,我遇到了这个问题:我无法在IE7中更改单选按钮选择。
例如,在我的页面上,我无法像controlTypes example那样使用IE7更改单选按钮选择。
有没有解决这个问题的办法?
发布于 2010-12-09 18:08:18
我已经找到解决方案了。通过为组中的所有单选按钮添加具有相同值的名称属性(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>
https://stackoverflow.com/questions/4400858
复制相似问题