switch(type) { case tpye1: break; case tpye2: break; case tpye3: break; case tpye4: break; }; 其中type可以是数字,也可以是字符串; 下载本文