js取得当天是星期几
/**
* 取得今天是星期几
*/
function getWeek(){
var result;
var now=new Date();
var year=now.getYear();
var month=now.getMonth()+1;
var date=now.getDate();
var day;
switch (now.getDay()){
case 0:day="日";
break;
case 1:day="一";
break;
case 2:day="二";
break;
case 3:day="三";
break;
case 4:day="四";
break;
case 5:day="五";
break;
case 6:day="六";
break;
}
result=year+"年"+month+"月"+date+"日"+" 星期"+day;
return result;
}