我需要使用JQuery微调器几个小时,所以模板将是: 00:00:00:00
当前微调器仅为数字设置。
我该怎么做呢?
发布于 2010-07-26 22:34:22
最简单的解决方案是为每个数字设置一个微调器。我设置了a demo here。
HTML
<div class="demo">
<p>
<label for="amount">Set the time (hh:mm:ss:fr):</label>
<input class="time hour" name="hour" value="0" />
<input class="time min" name="min" value="0" />
<input class="time sec" name="sec" value="0" />
<input class="time frames" name="frames" value="0" />
</p>
</div>脚本
$(function() {
$(".time").spinner({
min: 0,
max: 59,
step: 1,
start: 0,
precision: 0,
width: '2em'
});
$(".hour").spinner('option','max', 23);
$(".frames").spinner('option', 'max', 100);
});https://stackoverflow.com/questions/3334842
复制相似问题