How to get current time with jQuery

后端 未结 15 865
青春惊慌失措
青春惊慌失措 2020-12-07 08:10

The following returns time in microseconds, for example 4565212462.

alert( $.now() );

How do I convert it to a human readable time format,

15条回答
  •  爱一瞬间的悲伤
    2020-12-07 09:04

    .clock {
    width: 260px;
    margin: 0 auto;
    padding: 30px;
    color: #FFF;background:#333;
    }
    .clock ul {
    width: 250px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    text-align: center
    }
    
    .clock ul li {
    display: inline;
    font-size: 3em;
    text-align: center;
    font-family: "Arial", Helvetica, sans-serif;
    text-shadow: 0 2px 5px #55c6ff, 0 3px 6px #55c6ff, 0 4px 7px #55c6ff
    }
    #Date { 
    font-family: 'Arial', Helvetica, sans-serif;
    font-size: 26px;
    text-align: center;
    text-shadow: 0 2px 5px #55c6ff, 0 3px 6px #55c6ff;
    padding-bottom: 40px;
    }
    
    #point {
    position: relative;
    -moz-animation: mymove 1s ease infinite;
    -webkit-animation: mymove 1s ease infinite;
    padding-left: 10px;
    padding-right: 10px
    }
    
    /* Animasi Detik Kedap - Kedip */
    @-webkit-keyframes mymove 
    {
    0% {opacity:1.0; text-shadow:0 0 20px #00c6ff;}
    50% {opacity:0; text-shadow:none; }
    100% {opacity:1.0; text-shadow:0 0 20px #00c6ff; } 
    }
    
    @-moz-keyframes mymove 
    {
    0% {opacity:1.0; text-shadow:0 0 20px #00c6ff;}
    50% {opacity:0; text-shadow:none; }
    100% {opacity:1.0; text-shadow:0 0 20px #00c6ff; } 
    }
    
    
    
    
    • :
    • :

提交回复
热议问题