<html>
<head>
<title>js实现当前日期显示</title>
</head>
<body style="text-align: center">
<div>
<span id="curTime" style="font-size: 18px;color: #00be67"></span>
</div>
</body>
<script type="text/javascript" charset="utf-8">
$(function(){
var date = new Date();
var weekDay = ["星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
var year = date.getFullYear();
var month = date.getMonth()+1;
var day = date.getDate();
var week = weekDay[date.getDay()];
$("#curTime").html(year+"年"+month+"月"+day+"日      "+week);
})
</script>
</html>