我正在使用phonegap,html 5,knockout开发
下面的代码不适用于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>
答案 0 :(得分:0)
感谢您的关注Edward van Raak
只是小改变,单引号? 'for':id(),它可以正常工作<label data-bind="attr:{'for':id()+'check'}"></label>