1、引用文件:
1 2 3 4 | < link rel = "stylesheet" href = "./css/mobileSelect.css" /> < script type = "text/javascript" src = "./js/mobileSelect.js" ></ script > < script type = "text/javascript" src = "./js/selectDate.js" ></ script > |
2、html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | < ul class = "list" > 选择 YYYY-MM-DD格式: < input type = "text" id = "select_0" readonly /> < br /> < br /> < br /> 选择 YYYY-MM格式: < input type = "text" id = "select_1" readonly /> < br /> < br /> < br /> 选择 YYYY-MM格式(有至今选项): < input type = "text" id = "select_2" readonly data-type = "end" /> < br /> < br /> < br /> 选择 YYYY格式: < input type = "text" id = "select_3" readonly /> < br /> < br /> < br /> 选择 HH-MM格式: < input type = "text" id = "select_4" readonly /> < br /> < br /> < br /> 选择 HH-MM-SS格式: < input type = "text" id = "select_5" readonly /> < br /> < br /> < br /> < input type = "text" id = "select_6" readonly data-value = "" value = "" /> < input type = "button" value = "查看值" onclick = "showValue()" /> </ ul > |
3、方法调用:
1 2 3 4 5 6 | $.selectYY_MM_DD( "#select_0" ); //选择 YYYY-MM-dd 格式的调用 $.selectDate_YM( "#select_1" ); //选择 YYYY-MM 格式的调用 $.selectDate_YM_END( "#select_2" ); //选择 YYYY-MM格式(有至今选项)的调用 $.selectDate_Y( "#select_3" ); //选择 年份格式的调用 $.select_HH_MM( "#select_4" ); //选择时分格式 $.select_HH_MM_SS( "#select_5" ); //选择时分秒格式 |
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com