zoukankan      html  css  js  c++  java
  • js当前日期

    function CurentTime()
        { 
            var now = new Date();
           
            var year = now.getFullYear();       //年
            var month = now.getMonth() + 1;     //月
            var day = now.getDate();            //日
           
            var hh = now.getHours();            //时
            var mm = now.getMinutes();          //分
           
            var clock = year + "-";
           
            if(month < 10)
                clock += "0";
           
            clock += month + "-";
           
            if(day < 10)
                clock += "0";
               
            clock += day + " ";
           
            if(hh < 10)
                clock += "0";
               
            clock += hh + ":";
            if (mm < 10) clock += '0'; 
            clock += mm; 
            return(clock); 
        }
     

  • 相关阅读:
    "ERR unknown command 'cluster'"
    shell-url-decode
    mac-ppt-auto-open-recovery-files
    gorm-Duplicate-entry
    mac 终端光标在单词之间移动
    seelog 文件输出格式
    nginx-port-Permission-denied
    浏览器-网络
    浏览器-兼容性
    浏览器-浏览器知识
  • 原文地址:https://www.cnblogs.com/wcLT/p/4807284.html
Copyright © 2011-2022 走看看