SOURCE

console 命令行工具 X clear

                    
>
console
setInterval(function () {
    var day = new Date();
    var y = day.getFullYear();
    var m = day.getMonth() + 1;
    var d = day.getDate();
    var we = day.getDay(); //0-6
    var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]; //数组[0-6]
    var week = weeks[we];

    var h = day.getHours();
    var hh = h < 10 ? '0' + h : h;
    var min = day.getMinutes();
    var mm = min < 10 ? '0' + min : min;
    var s = day.getSeconds();
    var ss = s < 10 ? '0' + s : s;

    _top.innerText = y + "年" + m + "月" + d + "日" + week;
    b1.innerText = hh;

    b3.innerText = mm;

    b5.innerText = ss;
}, 1000)

var counter = 0;

setTimeout("blink()", 500);

function blink() {
    //b2.style.visibility =(b2.style.visibility == "hidden") ? "visible" : "hidden";
    b4.style.visibility = (b4.style.visibility == "hidden") ? "visible" : "hidden";
    b2.style.opacity = (b2.style.opacity == "0") ? "1" : "0";
    //b4.style.display =(b4.style.display == "none") ? "block" : "none";
    counter += 1;
    setTimeout("blink()", 500);
}
<div id="box">
	<div id="_top"></div>
	<div id="box_bottom">
        		<span id="b1">				
				</span>
				<span id="b2" style="opacity: 1;"> <!--style="display: none;">-->:					
				</span>
				<span id="b3">					
				</span>
				<span id="b4"><!--style="display: none;">-->:					
				</span>
				<span id="b5">					
				</span>
	</div>
</div>
#box {
				width: 300px;
				height: 300px;
				background-color: orangered;
				margin: 100px auto;
				padding: 30px;
			}
			
			#_top {
				width: 100%;
				height: 30px;
				text-align: center;
				font-size: 26px;
				color: #fff;
				margin-bottom: 40px;
			}
			
			#box_bottom {
				width: 90%;
				height: 70%;
				font-size: 40px;
				background-color: orange;
				color: #fff;
				margin: 0 auto;
				text-align: center;
				line-height: 200px;
				/*margin-left:auto;
				margin-right:auto;*/
			}
			
			#b1,
			#b2,
			#b3,
			#b4,
			#b5 {
				display: inline-block;
				/*float: left;*/
				width: 40px;
				height: 40px;
				/*border: 1px solid;*/
				margin-left: auto;
				margin-right: auto;
				text-align: center;
			}