zoukankan      html  css  js  c++  java
  • 时间(遍历)

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>无标题文档</title>
    </head>

    <body>
    <ul class="time">
     <!--秒杀开始时间戳--><li></li>
     <!--秒杀开始时间戳--><li></li>
     <!--秒杀开始时间戳--><li></li>
    </ul>

    <script src="js/jquery.1.11.js"></script>
    <script>
    $(document).ready(function(e) {
     var dat= new Date, year=dat.getFullYear(),month=dat.getMonth(),date=dat.getDate(),
     h=dat.getHours(),m=dat.getMinutes(),s=dat.getSeconds(),day=dat.getDate();
     //timestamp=Date.parse(date).toString().substr(0,10);//后台配合的时间戳
     $('.time li').each(function(index, element) {
      $(this).html(year+'年'+month+'月'+date+'日'+' '+h+'时'+m+'分'+s+'秒');
        });
    });
    </script>
    </body>
    </html>

  • 相关阅读:
    9-15
    9-5
    8-26
    8-24
    7-20
    7-17
    我离职后要干些什么
    6-18
    5-28
    5-20
  • 原文地址:https://www.cnblogs.com/xiaoleidiv/p/3711424.html
Copyright © 2011-2022 走看看