swtich (m) { case 1: { if (n==1) {} else {} } break; }
switch (s){ case "chanpin": if (this.chap.Visible == true) { this.chap.Visible=false; } else { this.chap.Visible =true;
} case "dingdan": if (this.chap.Visible == true) { this.chap.Visible=false; } else { this.chap.Visible =true; } } 它总是提示控制不能从一个 case 标签(“case "chanpin":”)贯穿到另一个 case 标签; 控制不能从一个 case 标签(“case "dingdan":”)贯穿到另一个 case 标签 请教大家,不胜感激!
switch (s){ case "chanpin": if (this.chap.Visible == true) { this.chap.Visible=false; } else { this.chap.Visible =true;
} break;//添加break case "dingdan": if (this.chap.Visible == true) { this.chap.Visible=false; } else { this.chap.Visible =true; } break; //添加上break; }
{
case 1:
{
if (n==1) {} else {}
}
break;
}
case "chanpin":
if (this.chap.Visible == true)
{
this.chap.Visible=false;
}
else
{
this.chap.Visible =true;
}
case "dingdan":
if (this.chap.Visible == true)
{
this.chap.Visible=false;
}
else
{
this.chap.Visible =true;
}
}
它总是提示控制不能从一个 case 标签(“case "chanpin":”)贯穿到另一个 case 标签;
控制不能从一个 case 标签(“case "dingdan":”)贯穿到另一个 case 标签
请教大家,不胜感激!
case "chanpin":
if (this.chap.Visible == true)
{
this.chap.Visible=false;
}
else
{
this.chap.Visible =true;
}
break;//添加break
case "dingdan":
if (this.chap.Visible == true)
{
this.chap.Visible=false;
}
else
{
this.chap.Visible =true;
}
break; //添加上break;
}