zoukankan      html  css  js  c++  java
  • javascript之日期对象(Date)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <script type="text/javascript">
    /*
    日期对象(Date)
    
    
    */
        var date = new Date(); //获取到当前的系统时间
        document.write("年:"+ date.getFullYear()+"<br/>");
        document.write("月:"+ (date.getMonth()+1)+"<br/>");
        document.write("日:"+ date.getDate()+"<br/>");
        
        document.write("时:"+ date.getHours()+"<br/>");
        document.write("分:"+ date.getMinutes()+"<br/>");
        document.write("秒:"+ date.getSeconds()+"<br/>");
        
        //xxxx年yy月dd日  hh:mm:ss
        
        //document.write("当前时间是:"+date.toLocaleString());
        document.write("当前时间是:"+date.getFullYear()+""+(date.getMonth()+1)+""+date.getDate()+""+
        date.getHours()+":"+date.getMinutes()+":"+date.getSeconds());
    
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    </head>
    <body>
        
    
    </body>
    </html>
  • 相关阅读:
    在k8s中部署jenkins
    k8s CI/CD介绍
    k8s 构建jenkinsslave
    k8s 安全框架
    k8s RBAC介绍
    k8s 存储小结
    k8s 实施准备工作
    k8s 网络示例
    jenkins在kubernetes中动态创建代理
    k8s 鉴权 授权 准入控制
  • 原文地址:https://www.cnblogs.com/loaderman/p/10005835.html
Copyright © 2011-2022 走看看