1

I need to clear (no selection) my first 2 radio buttons (CMR conv + Out of CMR) when choice is 'Disable things' .

淘汰赛有可能吗?

我已经禁用它们,但我还需要清除它们。

jsFiddle:http: //jsfiddle.net/mnucj/

CMR convention: <input type="radio" name="cmrConvention" value="true" data-bind="checkedRadioToBool: cmrConvention, disable: thirdPartyInsured() ? true : false">
<br/>
Out of CMR convention: <input type="radio" name="cmrConvention" value="false" data-bind="checkedRadioToBool: cmrConvention, disable: thirdPartyInsured() ? true : false">
<br/>
- - - - - -
<br/>
Enable things: <input type="radio" name="thirdParty" value="false" data-bind="checkedRadioToBool: thirdPartyInsured">
<br/>
Disable things: <input type="radio" name="thirdParty" value="true" data-bind="checkedRadioToBool: thirdPartyInsured">

谢谢。

4

1 回答 1

0

当单击“禁用事物”复选框时,您可以使用单击绑定,如下所示:

Disable things: 
<input type="radio" name="thirdParty" value="true" 
       data-bind="checkedRadioToBool: thirdPartyInsured, 
                  click: function() { cmrConvention(null); return true; }">

请参阅更新的小提琴

于 2013-04-29T15:22:07.147 回答