jQuery实现的输入框选择时间插件用法实例
本文向大家介绍jQuery实现的输入框选择时间插件用法实例,包括了jQuery实现的输入框选择时间插件用法实例的使用技巧和注意事项,需要的朋友参考一下
本文实例讲述了jQuery实现的输入框选择时间插件用法。分享给大家供大家参考。具体实现方法如下:
<!dooCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/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>
本文中的时间插件jquery.settime.js点击此处本站下载。
希望本文所述对大家的jQuery程序设计有所帮助。
声明:本文内容来源于网络,版权归原作者所有,内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎发送邮件至:notice#yiidian.com(发邮件时,请将#更换为@)进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。