问题出在哪
var nowDate=new Date();
var endDate=new Date(2018,6,7);
var day=Math.ceil((endDate.getTime()-nowDate.getTime())/(24*60*60*1000));
document.getElementById("leftTime").innerHTML=day;
<div id="concent">
离高考还有<span id="leftTime"></span>天
</div>
var nowDate=new Date();
var endDate=new Date(2018,6,7);
var day=Math.ceil((endDate.getTime()-nowDate.getTime())/(24*60*60*1000));
document.getElementById("leftTime").innerHTML=day;
<div id="concent">
离高考还有<span id="leftTime"></span>天
</div>
2017-12-19
举报