帮助!if/elseif/else 代码块不起作用!当代码到达提示“你会做什么?” 无论您键入什么,您都会收到所有警报。当您键入不在 if 块中的命令时,它应该显示为空白,如果您输入了 R、L 或 M,它会提示您。输入 F 应该不会提示您。
while (Room = 1) {
var Choice = prompt ("What will you do?");
if (Turn = "Start");
{
if (Choice = "F");
{
Turn = "1";
}
else if (Choice = "R");
{
alert ("You cannot do that...");
}
else if (Choice = "L");
{
alert ("You cannot do that...");
}
else if (Choice = "M");
{
alert (" 1"+'\n'+" 1" + '\n' + "221" + '\n' + " X");
}
else
{
alert ("You cannot do that...")
}
}