example:


  
  1. var weekday = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; 
  2. var today = new Date(); 
  3. alert("Today is "+weekday[today.getDay()]); 

month:0~11对应1~12月

返回值:0对应Sunday,1~6对应Monday~Saturday