标签:
<html>
<head>
<title>日期</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
var nowTime = new Date();
//获取日期的年月日
var c = ":";
var year = nowTime.getYear();
var month = nowTime.getMonth();
var date = nowTime.getDate();
var hours = nowTime.getHours();
var minute = nowTime.getMinutes();
var seconds = nowTime.getSeconds();
var s = "当前本地时间:";
s = year+c+month+c+date+" "+hours+c+minute+c+seconds;
debugger;
</script>
</head>
<body>
</body>
</html>
标签:
原文地址:http://www.cnblogs.com/wangqiang4518/p/5727188.html