var date=new Date(); date.getDay();//获取当日是星期几 date.setYear(2012); date.setMonth(11); date.setDate(6); date.getDay();//获取2012-11-6是周几