欢迎您  本站地址:   jQuery手机端预约时间选择代码-小库平台

小库平台

 找回密码
 立即注册
jQuery手机端预约时间选择代码-小库平台

小库平台

 找回密码
 立即注册
上一主题 下一主题

jQuery手机端预约时间选择代码

跳转到指定楼层
楼主
|只看大图 回帖奖励 |倒序浏览 |阅读模式

一款简洁美观的jQuery手机端点击遮罩弹出预约时间选择代码,适合做移动端时间选择功能。默认参数通过url末尾数值传递“?type=33?type=34?type=35”自行选择修改。

js代码
<scriptsrc="js/jquery.min.js"type="text/javascript"></script>
<scriptsrc="js/jquery.promptu-menu.js"type="text/javascript"></script>
<scripttype="text/javascript">
$(function(){
vartype=1;

if(type==1){
vartype_='hour';
varlength_=1;
}else{
if(type==2||type==3){
vartype_='hour';
}else{
vartype_='halfHour';
}
varlength_=3;
}varnowDateArray=getNowFormatDate().split('');
vardate_=nowDateArray[0];
//vartype_='halfHour';
t(date_,type_,length_);
$('.mask-time').height($(window).height());
$('#doc-select-1').click(function(){
$('.mask-time,.time-area').show();});
if($('#fill_infomation_date_start1').val()=="请选择开始时间"){
$('#fill_infomation_date_start1').css('color','#afb2b2')
}else{
$('#fill_infomation_date_start1').css('color','#333')
}
$('.btn-choose-time').click(function(){
$('#fill_infomation_date_start1').css('color','#333')
if(!$('input[name=time_]').val()){
returnalert('请选择服务时间');
}
vartextTime=$('input[name=time_]').val().split(':');
$('#fill_infomation_date_start1').val($('input[name=date_]').val()+''+textTime[0]+':'+textTime[1]);
$('input[name=start_time]').val($('input[name=date_]').val()+''+textTime[0]+':'+textTime[1]+':00');
$('.mask-time,.time-area').css("display","none");
$('#doc-select-1').attr('value',2);
});});
</script>



下载
回复

使用道具 举报

小黑屋|小库平台

GMT+8, 2024-9-20 10:30 , Processed in 0.910983 second(s), 19 queries , Xcache On.

Powered by Discuz! 3.4

小库提示

扫描下方二维码,访问手机版。