求指点怎样改是才能显示正确的倒计时时间现在到2017.1.1.10.10.36

<!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>


汤勺614614
浏览 1433回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript