jquery获取当前时间

 //获取当前日期
        function show() {
            var mydate = new Date();
            var str = "" + mydate.getFullYear() + "-";
            str += (mydate.getMonth() + 1) + "-";
            str += mydate.getDate();
            return str;
        }
        var nowDate = show();

posted on 2015-11-23 11:09  張暁磊  阅读(175)  评论(0编辑  收藏  举报