SOURCE

console 命令行工具 X clear

                    
>
console
function startTime()
{
var today=new Date()
var h=today.getHours()
var m=today.getMinutes()
var s=today.getSeconds()
// add a zero in front of numbers<10
m=checkTime(m)
s=checkTime(s)
document.getElementById('timetxt').innerHTML=h+":"+m+":"+s
t=setTimeout('startTime()',500)
}

function checkTime(i)
{
if (i<10) 
  {i="0" + i}
  return i
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="baidu-site-verification" content="code-90bBbrvHy7" />
    <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
    <link rel="icon" href="./favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="./css/indexx.css">
    <script type="text/javascript" src="./js/indexx.js"></script>
    <title>1213877477</title>


</head>
<body onload="startTime()" >
    <div class="headd">hhhhhhhh</div>
    <div class="mainm">
    <div class="cal">
        <a href="./cal/cal.html" target="_blank">计算</a>
    </div>
    <div class="shiZhong">
        <a href="./罗盘时钟/index.html">罗盘时钟</a>
    </div>
    </div>

    <div class="diary">
        <a href="./diary/diary.html" target="_blank">日志</a>
    </div>
    <div class="BackHouse">
        <!-- <img src="./img/house.bmp" class="houseBMP" alt=""> -->
    <a href="./house/BackHouse.html" target="_blank" >小屋</a>
    </div>
    <div id="timetxt"></div>
   
</body>
</html>
body{
    /* background-image: url(../img/indexBackground.jpg);
    background-position: center;
    background-size: cover;
    background-attachment: scroll; */
    /* width: 1000px;
    height: 1500px; */
    background-color: #eac8b4e0;
    position: relative;
}
.headd{
    font-size: 50px;
    position: absolute;
    top: 2%;
    left:35%;
}
.BackHouse{
    position: fixed;
    right: 5%;
    top:30%;
    font-size: 20px;
}
.houseBMP{
    width: 40px;
    height: 40px;
    position: relative;
    top:5px;
}
.diary{
    position: fixed;
    bottom: 5%;
    right: 5%;
    font-size: 20px;
    text-align: center;
}
#timetxt{
    position:fixed;
    right: 15%;
    bottom: 5%;
}

.mainm{
    /* width: 800px;
    height: 1000px; */
    position: absolute;
    left: 50%;
    top:100px;
    background-color: rgb(232, 233, 241);
    box-shadow: 1px 10px 30px 0 rgb(139, 139, 139);
    border-radius: 20px;
}

.cal{
    background-color: whitesmoke;
    margin: 0 auto;
    box-shadow: 2px 2px 2px rgb(92, 91, 91);
    border-radius: 20%;
    /* width: 70px;
    height: 50px; */
    font-size: 20px;
    text-align: center;
    margin-top: 10%;
    margin-left: 20px;
    margin-right: 20px;
    text-decoration: none;
}
.shiZhong {
    background-color: whitesmoke;
    margin: 0 auto;
    box-shadow: 2px 2px 2px rgb(92, 91, 91);
    border-radius: 20%;
    /* width: 140px;
    height: 50px; */
    font-size: 20px;
    text-align: center;
    margin-top: 10%;
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 20px;
    text-decoration: none;
}
a:hover, a:visited, a:link, a:active {
    color: rgb(80, 144, 240);
     text-decoration: none;
    }