<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<div id="time"></div>
<script>
function nowtime(){
var now=new Date();
var futura=new Date();
var year=now.getFullYear();
var month=now.getMonth()+1;
var day=now.getDate();
var hours=now.getHours()
var minutes=now.getMinutes();
var Seconds=now.getSeconds();
var fyear=futura.setFullYear(2017);
var fmonth=futura.setMonth(1)+1;
var fday=futura.setDate(1);
var fhours=futura.setHours(10)
var fminutes=futura.setMinutes(10);
var fSeconds=futura.setSeconds(36);
document.getElementById("time").innerHTML="<h1>"+(fyear-year)+"年"+(fmonth-month)+"月"+(fday-day)+"日"+(fhours-hours)+":"+(fminutes-minutes)+":"+(fSeconds-Seconds)+"</h1>";
}
var t=setInterval(nowtime,1000);
// function ftime(){
//
// }
</script>
</body>
</html>
相关分类