我在 HTML 中编写了以下 switch 语句:
<script>
const day = prompt("Enter day number: ");
switch (day) {
case 1:
document.write("Sun");
break;
case 2:
document.write("Mon");
break;
case 3:
document.write("Tue");
break;
default:
document.write("Wrong Choice");
}
</script>
Wrong Choice即使我通过1或2
斯蒂芬大帝
蝴蝶刀刀
相关分类