jQuery弹出框选择生日特效代码下载

jQuery弹出框选择生日特效代码下载

1. 引入JS

<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/timeData.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/timeData.js" type="text/javascript" charset="utf-8"></script>

2. HTML代码

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<style type="text/css">
	input{
		outline: none;
	}
	a{text-decoration: none;}
	.timeData{
		width: 150px;
		height: 128px;
		display: none;
		position: absolute;
		left: 0;
		box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
		font-size: 14px;
		font-family: "Segoe UI",Helvetica, Arial, sans-serif;
		border: 1px solid #ddd;
	}
	.timeData >div{
		width: 33.33%;
		float: left;
		height: 128px;			
	}
	.timeData >div >a{display: block;width: 80%;padding: 10px 10% 10px;text-align: center;color: #C0A16B;transition: all 0.3s;}
	.timeData >div >a:hover{background: #C0A16B;color: #fff;}
	.timeData >div >input{outline: none;width: 80%;height: 30px;display: block;margin: 10px auto 10px;line-height: 30px;text-align: center;color: #000;}
	.timeData >span{display: none;text-indent: 4px;color: #C9302C;font-size: 13px;position: absolute;left: 0;top: 132px;}
	/*三角*/
	.timeData:after{
		border-bottom: 6px solid #CCCCCC;
		border-left: 6px solid transparent;
		border-right: 6px solid transparent;
		content: "";
		left: 7px;
		position: absolute;
		top: -6px;
	}
</style>
<center>点击左侧的输入框查看效果</center>
<body style="padding: 30px;">
<!--<div class="timeData">
	<div class="year">
		<a href="#">上</a>
		<input class="year_input" type="text" name="" id="" value="" />
		<a href="#">下</a>
	</div>	
	<div class="month">
		<a href="#">上</a>
		<input class="year_month" type="text" name="" id="" value="" />
		<a href="#">下</a>
	</div>
	<div class="day">
		<a href="#">上</a>
		<input class="year_day" type="text" name="" id="" value="" />
		<a href="#">下</a>
	</div>
</div>-->
<div class="div_input" style="position: relative;">
	<input type="text" name="" id="dataInput" value="" />			
</div>
<script>
	$(function(){
		$("#dataInput").off("timeData").on("timeData",function(event){
			if(timei==1){
				alert("回调函数")
				timei=0;
			}
		}).dataYear()
	})
</script>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
</div>
</body>
</html>

用户评论

18素材网

一个让开发更高效的素材分享平台,用于快速开发强大的Web界面。


官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:864918708
Css3+Html5讨论群
群号:864918708

加群请备注:从官网了解到