缺括号,要这么写:If(MenuIndex==0){ShowPicture("动画连接");}If(MenuIndex==1&&childmenuindex==0){ShowPicture("OK");}