码迷,mamicode.com
首页 > Web开发 > 详细

js 获取星期

时间:2015-03-06 18:38:05      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:

         var week;
            if (new Date().getDay() == 0) week = "星期日";
            if (new Date().getDay() == 1) week = "星期一";
            if (new Date().getDay() == 2) week = "星期二";
            if (new Date().getDay() == 3) week = "星期三";
            if (new Date().getDay() == 4) week = "星期四";
            if (new Date().getDay() == 5) week = "星期五";
            if (new Date().getDay() == 6) week = "星期六";

js 获取星期

标签:

原文地址:http://www.cnblogs.com/lizihong/p/4318787.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!