Home » パソコン » 言語 etc... » JavaScript » [Javascript] Study » [Javascript] 多岐分岐
[Javascript] 多岐分岐
switch(a){
case 1:
document.write(1);
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;
default:
document.write("Default");
}
case 1:
document.write(1);
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;
default:
document.write("Default");
}