我已經搜索網,並試圖提到不同的方法,但點擊功能有時火災,有時沒有。數據綁定上點擊有多個參數的函數淘汰賽
這裏是我的html代碼
<input type="radio" data-bind="checked:a,checkedValue: 0, click: radio('dance','a')" id="a_normal" ><span class="OptionsTextProperties"> Normal </span>
<input type="radio" data-bind="checked:a, checkedValue: 1 , click: radio('dance','a')" id="a_abnormal" ><span class="OptionsTextProperties"> Abnormal </span>
這裏是我試圖調用
radio : function(key,key1)
{
console.log(key,key1);
return;
},
大部分的時間上面的函數火災的功能,但有時當我按一下按鈕沒有任何反應。 我也用綁定但也不至於檢查的單選按鈕。不確定是什麼問題。我也在這裏通過了很多鏈接在stackoverflow。也許我做了一些我不能指出的錯誤。 感謝您的幫助
它似乎工作的小提琴。 https://jsfiddle.net/gqaLcapv/1/ click事件觸發始終。 – Adrian
嘿阿德里安,它大部分時間都在工作......即使我在小提琴中試過,它效果很好。由於 – user6000866