【发布时间】:2010-06-08 00:49:36
【问题描述】:
我可以在 switch 语句中使用间隔吗?
喜欢
switch (parseInt(troops[i])) {
case <10:
editbox.style.fontSize = "13px";
break;
case <100:
editbox.style.fontSize = "12px";
break;
case <1000:
editbox.style.fontSize = "8px";
editbox.size = 3;
//editbox.style.width = "18px";
break;
default:
editbox.style.fontSize = "10px";
}
???
【问题讨论】:
标签: javascript switch-statement intervals