zoukankan      html  css  js  c++  java
  • PHP(函数)

    <script>

    // 获得日
    var time = new Date();
    var x = time.getDate();
    document.write(x+"日,");

    // 获得当前小时

    var b = new Date();
    var y = time.getHours();
    document.write(y+"点,");

    // 获取分钟

    var c = new Date();
    var v = time.getMinutes();
    document.write(v+"分,");

    // 获取时间戳
    var t = new Date();
    var w = time.getTime();
    document.write(w+"时间戳,");


    // 获得年份

    var e = new Date();
    var q = time.getFullYear();
    document.write(q+"年,");

    // 获取月份
    var g = new Date();
    var a = time.getMonth()+1;
    document.write(a+"月,");


    // 获取秒
    var b = new Date();
    var m = b.getSeconds();
    document.write(m+"秒,");

    // 获取毫秒
    var l = new Date();
    var p = l.getMilliseconds();
    document.write(p+"毫秒,");

    // 获得星期几
    var xing = new Date();
    var ji = xing.getDay();
    document.write("星期"+ji+",");

    // 获得完整日期
    var riqi = new Date();
    var wanzheng =Date();
    document.write("完整时间:"+wanzheng+",");

    </script>

  • 相关阅读:
    awk实例
    imagemagick imagick
    sort 命令
    cut 命令
    tr命令
    uniq
    多线程编程之Linux环境下的多线程(一)
    多线程编程之Windows同步方式
    多线程编程之数据访问互斥
    多线程编程之基础概念
  • 原文地址:https://www.cnblogs.com/GP1014336455/p/7421603.html
Copyright © 2011-2022 走看看