<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>日历特效代码</title>
<!--网上下载/jquery-2.2.4.js,laydate.js,laydate.css两个js和一个css-->
<script src="js/jquery-2.2.4.js" type="text/javascript" charset="utf-8"></script>
<script src="js/laydate.js"></script>
<link rel="stylesheet" type="text/css" href="css/laydate.css"/>
<style>
#Date{ outline: none; font-size: 33px; background: #3081C2; color: #fff; text-align: center; border: none; border-radius: 8px;}
</style>
</head>
<body>
<input id="Date" onclick="laydate()">
</body>
</html>
<script type="text/javascript">
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
if(month < 10) {
month = "0" + month;
}
if(day < 10) {
day = "0" + day;
}
$("#Date").val(year + " -" +month + " -" +day);
</script>
日期小插件
最新推荐文章于 2024-04-18 11:43:46 发布