首先您需要有php或是c的基础. 否则可能看不明白 方法如下 if 表达式{ //需要注意的是 没有括号. 没错. 没有括号 比如 if 1>2 {}else{} } else { } switch 变量{ case 值1 : case 值2: default ://这时面没有break; } select{//跟上面类似 case xxx: .... }