var myweek =1;//myweek表示星期几变量
switch(myweek)
{
var myweek =1;//myweek表示星期几变量
switch(myweek){
case 1:
document.write("周一");
break;
case 2:
document.write("周2");
break;
case 3:
document.write("周3");
break;
case 4:
document.write("周4");
break;
case 5:
document.write("周5");
break;
case 6:
document.write("周6");
break;
case 7:
document.write("周7");
break;
default:
document.write("???!");
}
}
对的,只用一次switch case即可
谢谢,这一段刚学所以搞糊了
为啥要嵌套两遍