var myDate = new Date();
var nowHours = myDate.getHours();
var nowWeek = myDate.getDay();
if(nowHours>=18 || week>5 || nowHours<=8 || week ==0){
alert("在周一到周五18:00-8:00时间范围")
}else{
alert(“不在范围”)
}
var nowday = "日一二三四五六";
var str="今天星期"+charAt(new Date().getDay());