2019年的春节已经过去了x天x时x分

Original 2019-02-10 16:00:06 149
abstract:<!DOCTYPE html> <html lang = "en"> <head>     <meta charset = "UTF-8">     <ti
<!DOCTYPE html>
<html lang = "en">
<head>
    <meta charset = "UTF-8">
    <title>Date日期操作方法</title>
    <style>
        .box {
            width: 100%;
            height: 500px;
            background: pink;
        }
        
        p {
            text-align: center;
            line-height: 400px;
            color: #FFF;
            font-size: 20px;
        }
    </style>
</head>
<body>
<div class = "box">
    <p></p>
</div>
</body>
<script>
    setInterval(function () {
        var t = new Date().getTime() - new Date('2019.02.05').getTime();
        if (t > 0) {
            t = parseInt(t / 1000);
            var seconds = parseInt(t % 60);
            var mins = parseInt(t / 60 % 60);
            var hours = parseInt(t / 60 / 60 % 24);
            var day = parseInt(t / 60 / 60 / 24);
            document.getElementsByTagName('p')[0].innerHTML = "2019年的春节已经过去了" + day + '天' + hours + '小时' + mins + '分' + seconds + '秒';
        }
    }, 1000);
</script>
</html>


Correcting teacher:查无此人Correction time:2019-02-11 09:49:48
Teacher's summary:完成的不错。这是要提前自己要努力吗?继续加油。

Release Notes

Popular Entries