var array= new Array();
var date = 2016-8-10;//日期为输入日期,格式为 2016-8-10
array=date.split('-');
var ndate=new Date(array[0],parseInt(array[1]-1),array[2]);
var weekArray = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
var weekDay = weekArray[ndate.getDay()];
var date = 2016-8-10;//日期为输入日期,格式为 2016-8-10
array=date.split('-');
var ndate=new Date(array[0],parseInt(array[1]-1),array[2]);
var weekArray = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
var weekDay = weekArray[ndate.getDay()];