我想更改输入元素(“cookingTime”)。
$('#cookingTime').mobiscroll({ preset: 'time', lang: 'fr', display: 'bottom', mode: 'scroller', theme: 'android' });
$('#cookingTime').click(function () { $('#cookingTime').mobiscroll('show'); });
$("#cookingTime").mobiscroll('setValue', result.cookingTime);最后一行修改了单击input元素时的当前时间,但不修改input元素的值。
如何在输入元素中打印正确的时间?
谢谢
发布于 2014-08-11 19:04:06
使用fill参数也可以更新输入值。
您的代码应该如下所示:$("#cookingTime").mobiscroll('setValue', result.cookingTime, true);
有关更多信息,请参阅setValue docs。
https://stackoverflow.com/questions/25231428
复制相似问题