首页 > Web开发 > 详细

js获取当前年月日

时间:2014-09-28 16:59:24      阅读:280      评论:0      收藏:0      [点我收藏+]

function GetDate(){

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();             //分

}

js获取当前年月日

原文:http://www.cnblogs.com/flywing/p/3998358.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!