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

JS获取当天是周几

时间:2015-05-05 11:57:35      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:

                                    dt2 = new Date();
                                    var weekDay = ["星期天""星期一""星期二""星期三""星期四""星期五""星期六"];
                                    if( weekDay[dt2.getDay()] == 星期一 )
                                    {
                                        str += line[i].SENDTIMEMONDAY;
                                    }
                                    if( weekDay[dt2.getDay()] == 星期二 )
                                    {
                                        str += line[i].SENDTIMETUESDAY;
                                    }
                                    if( weekDay[dt2.getDay()] == 星期三 )
                                    {
                                        str += line[i].SENDTIMEWEDNESDAY;
                                    }
                                    if( weekDay[dt2.getDay()] == 星期四 )
                                    {
                                       str += line[i].SENDTIMETHURSDAY;
                                    }
                                    if( weekDay[dt2.getDay()] == 星期五 )
                                    {
                                        str += line[i].SENDTIMEFRIDAY;
                                    }
                                    if( weekDay[dt2.getDay()] == 星期六 )
                                    {
                                         str += line[i].SENDTIMESATURDAY;
                                    }
                                    if( weekDay[dt2.getDay()] == 星期天 )
                                    {
                                        str += line[i].SENDTIMESUNDAY;
                                    }

JS获取当天是周几

标签:

原文地址:http://www.cnblogs.com/zecVip/p/4478437.html

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