簡體   English   中英

data-bind =“ attr:{for:id()+'check'}”不適用於2.3 android,但適用於4.0+ android

[英]data-bind=“attr:{for:id()+'check'}” do not work for 2.3 android but work for 4.0+ android

我正在使用phonegap,html 5,nockout開發
下面的代碼不適用於2.3 android,但適用於4.0+ android

<input type="checkbox" data-bind="checked: IsChecked,attr:{Id:id()+'check'}" class="checkBoxInput" />
                <label data-bind="attr:{for:id()+'check'}"></label>

可能是腳本錯誤,但此后未加載任何敲除數據。

下面的代碼(沒有ko的硬編碼)在哪里工作

<input type="checkbox" id="test" class="checkBoxInput" />
                <label for="test"></label>

感謝您的關注Edward Van Raak

只是零錢,單引號? 'for':id()可以正常工作

<label data-bind="attr:{'for':id()+'check'}"></label>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM