jQuery实现的输入框选择时间插件用法实例
网络编程 2021-07-04 21:47www.168986.cn编程入门
这篇文章主要介绍了jQuery实现的输入框选择时间插件用法,实例分析了jQuery插件jquery.settime.js的使用技巧,具有一定参考借鉴价值,需要的朋友可以参考下
本文实例讲述了jQuery实现的输入框选择时间插件用法。分享给大家供大家参考。具体实现方法如下
代码如下:
<!dooCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://.w3./TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta charset = utf8>
<title>jQuery实现的输入框选择时间插件</title>
<script charset="utf-8" src="/js/jquery-1.6.2.min.js"></script>
<script charset="utf-8" src="/js/jquery.settime.js"></script>
</head>
<body>
<p id="msg">msg </p>
<p >time1<input id="time" value="" /></p>
<p >time2<input id="time2" value="" /></p>
<p >time3<input id="time3" value="" /></p>
<p ><input type = button id="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>
<html>
<head>
<meta charset = utf8>
<title>jQuery实现的输入框选择时间插件</title>
<script charset="utf-8" src="/js/jquery-1.6.2.min.js"></script>
<script charset="utf-8" src="/js/jquery.settime.js"></script>
</head>
<body>
<p id="msg">msg </p>
<p >time1<input id="time" value="" /></p>
<p >time2<input id="time2" value="" /></p>
<p >time3<input id="time3" value="" /></p>
<p ><input type = button id="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程序设计有所帮助。
编程语言
- 宿迁百度关键词排名指南:实现精准营销的关键
- 四川SEO优化怎么做网络推广
- 立昂技术备案老域名收购:如何为您的业务赋能
- 安徽百度关键词seo贵不贵,一般需要多少钱
- 吉林百度快照排名怎么做电话营销
- 多伦新手做SEO怎么做
- 甘肃优化关键词排名推广怎么做论坛营销
- 沙雅SEO网站推广:提升您的在线可见性
- 四川SEO优化如何提升销售额和销售量
- 聂荣网站排名优化:提升网站可见性的全方位指
- 涞水SEO:提升地方企业在线可见性的策略
- 辽宁百度seo排名怎样做网站排名
- 临湘哪有关键词排名优化:提升网站可见度的关
- 黑龙江百度网站优化有没有优惠
- 凉城优化关键词排名推广:提升您的网络可见性
- 萝北整站优化:提升您网站流量和排名的全面指