zoukankan
html css js c++ java
Js获取当前日期时间
Js获取当前日期时间
var myDate = new Date();
myDate.getYear();
//获取当前年份(2位)
myDate.getFullYear();
//获取完整的年份(4位,1970-????)
myDate.getMonth();
//获取当前月份(0-11,0代表1月)
myDate.getDate();
//获取当前日(1-31)
myDate.getDay();
//获取当前星期X(0-6,0代表星期天)
myDate.getTime();
//获取当前时间(从1970.1.1开始的毫秒数)
myDate.getHours();
//获取当前小时数(0-23)
myDate.getMinutes();
//获取当前分钟数(0-59)
myDate.getSeconds();
//获取当前秒数(0-59)
myDate.getMilliseconds();
//获取当前毫秒数(0-999)
myDate.toLocaleDateString();
//获取当前日期
var mytime=myDate.toLocaleTimeString();
//获取当前时间
myDate.toLocaleString( );
//获取日期与时间
查看全文
相关阅读:
安卓iOS软件免编程开发步骤
我的站被收录了两次,被封掉两次,怎么办?
百度算法调整 优化网站该从哪几方面着手?
如何成为php编程高手
百度等搜索引擎寻找各种数据库网站的方法
【网站抓取】如何正确识别Baiduspider移动ua
EditPlus 技巧大全:[1]怎么配置PHP编译环境
如何本地搭建php环境用来测试PHP程序教程!
用最简洁的代码构建MVC分层
BMR计算器2——python第三课(字符串分割,格式化输出,异常处理)
原文地址:https://www.cnblogs.com/xiaohui1990/p/3431054.html
最新文章
FPGA视频图像之高清需要多大的ddr2之二
FPGA视频图像之高清需要多大的ddr2
FPGA机器学习之BP神经网络4
FPGA 机器学习之BP神经网络3
python list sorting, return top N large elements index
ubuntu 16.04 + N驱动安装 +CUDA+Qt5 + opencv
PTAM 编译安装 on MAC(mavericks)
Mac下搭建php开发环境[翻译]+自己总结(红字)
基于暗通道优先算法的去雾应用(Matlab/C++)
第二次结对编程
热门文章
结对编程代码审查
第三次作业
使用Visual Studio 2017进行单元测试
知之好之乐之
折半查找的递归改写
合并链表
深度优先搜索之全排列
桶排序
我的大学生活
http状态码一览表以及HTTP响应的返回头信息(详解)
Copyright © 2011-2022 走看看