function dayList(len){
var d = '日一二三四五六';
var sDay = new Date().getDay();
var result = [];
var i = 0;
while(ivar tmp = sDay+i ;
if(!((sDay+i) <7)){
tmp = (sDay+i)%7
}
result.push('周'+d.charAt(tmp));
i++;
}
return result;
}
console.log(dayList(17));
//上面代码中yuanma变量中储存的就是本页面的源码。