日期插件rolldate.js的使用
生活随笔
收集整理的這篇文章主要介紹了
日期插件rolldate.js的使用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
日期插件rolldate.js的使用
?下載地址:http://www.jq22.com/jquery-info19834
效果:
?
?
代碼:
?
<!DOCTYPE html> <html lang="en"><head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta http-equiv="X-UA-Compatible" content="ie=edge" /><link rel="stylesheet" href="js/rolldate/rolldate.css" /><title>日期插件</title><style>input{display: block;border-radius: 4px;outline: none;border: 1px solid #ccc;width: 200px;height: 30px;margin: 20px auto;padding-right: 10px;text-align: right;}</style></head><body><input readonly type="text" id="date" placeholder="YY-MM-DD" /><script src="js/jquery-3.2.1.min.js"></script><script src="js/rolldate/rolldate.js"></script><script>$(function() {new rolldate.Date({el: "#date",format: "YYYY-MM-DD",beginYear: 2000,endYear: 2100,theme: "blue",tapBefore: function(el) {console.log("插件開始觸發");},moveEnd: function(el, iscroll) {console.log("滾動結束");},confirmBefore: function(el, date) {console.log("確定按鈕觸發");},confirmEnd: function(el, date) {console.log("插件運行結束");}});});</script></body> </html>?
更多專業前端知識,請上 【猿2048】www.mk2048.com
總結
以上是生活随笔為你收集整理的日期插件rolldate.js的使用的全部內容,希望文章能夠幫你解決所遇到的問題。