JS中的switch case

function GetDepartmentName(type) {
switch (type) {
case DepartMentQian:
alert($('#DepartMentQian').val());
break;
case DepartMentHou:
alert($('#DepartMentHou').val());
break;
case DepartMentXiu:
alert($('#DepartMentXiu').val());
break;
case DepartMentFuJian:
alert($('#DepartMentFuJian').val());
break;
}

}

posted @ 2017-03-14 10:34  小猫钓鱼吃鱼  阅读(668)  评论(0编辑  收藏  举报