[英]data-bind=“attr:{for:id()+'check'}” do not work for 2.3 android but work for 4.0+ android
I am using phonegap, html 5,knockout to develop 我正在使用phonegap,html 5,nockout开发
Below code do not work for 2.3 android but work for 4.0+ android 下面的代码不适用于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>
May be a script error but none of the knockout data load after that. 可能是脚本错误,但此后未加载任何敲除数据。
Where as code below (hard-coded without ko) works 下面的代码(没有ko的硬编码)在哪里工作
<input type="checkbox" id="test" class="checkBoxInput" />
<label for="test"></label>
Thanks for your attention Edward van Raak 感谢您的关注Edward Van Raak
just small change, single quotes? 只是零钱,单引号? 'for':id() and it work 'for':id()可以正常工作
<label data-bind="attr:{'for':id()+'check'}"></label>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.