jQuery实现的输入框选择时间插件用法实例
本文实例讲述了jQuery实现的输入框选择时间插件用法。分享给大家供大家参考。具体实现方法如下:
<!dooCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<metacharset=utf8>
<title>jQuery实现的输入框选择时间插件</title>
<scriptcharset="utf-8"src="/js/jquery-1.6.2.min.js"></script>
<scriptcharset="utf-8"src="/js/jquery.settime.js"></script>
</head>
<body>
<pid="msg">msg</p>
<p>time1<inputid="time"value=""/></p>
<p>time2<inputid="time2"value=""/></p>
<p>time3<inputid="time3"value=""/></p>
<p><inputtype=buttonid="button"value="button"/></p>
<div>
</div>
<script>
$('#time').setTime();
$('#time2').setTime({
drag:true,
h:[5,20],
i:[5,50],
s:[5,45],
a:0.05,
constraint:'',
'starteffect':function(d){
$('#msg').html(d[0]);
},
'onmove':function(e){
$('#msg').html(e[0]+'/'+e[1])
},
zindex:'0',
'cursor':'move',
'area':[[50,600],[10,5000]],
'callback':function(){
//alert(1)
}
});
$('#time3').setTime({
drag:true,
a:0.05
});
$('#button').click(function(){
alert($('#time').val());
alert($('#time2').val());
alert($('#time3').val());
});
</script>
</body>
</html>
本文中的时间插件jquery.settime.js点击此处本站下载。
希望本文所述对大家的jQuery程序设计有所帮助。
热门推荐
10 诗词送行祝福语大全简短
11 新房开工吉日祝福语简短
12 50多岁生日简短祝福语
13 安徽疫情祝福语简短英语
14 农民朋友发财祝福语简短
15 对生活祝福语简短精辟
16 搬家词简短祝福语朋友
17 女神结婚快乐祝福语简短
18 文学短句祝福语大全简短