zoukankan      html  css  js  c++  java
  • Date对象

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Date对象</title>
    </head>
    <body>
        <script>
            //构建对象
            var date = new Date()
            //获取年份
            var fullyear = date.getFullYear();
            document.write(fullyear)
            document.write("<br/>")
            //获取月份(取值范围为0~11)
            var month = date.getMonth();
            month = month + 1
            document.write(month)
            document.write("<br/>")
            //取这个月的几号
            var dayofmonth = date.getDate()
            /*   getDay();
               getHours();
               getSeconds();
               getMilliseconds();*/
            document.write(dayofmonth)
        </script>
    </body></html>
  • 相关阅读:
    配置管理puppet
    ruby安装
    angularjs 安装篇
    idea 快捷键
    rabbitmq java queue
    spring cloud bus rabbitmq
    rabbitmq 安装篇
    spring cloud eureka
    spring cloud config
    postgre 导入sql文件
  • 原文地址:https://www.cnblogs.com/001yjk/p/10747355.html
Copyright © 2011-2022 走看看