String s = "aoood";
System.out.println(s.indexOf(""));//返回0 System.out.println(s.indexOf("w"));//返回-1 例如 var customerKinds="GR,QY"; (customerKinds.indexOf(customerKind)!= -1){ -------------------------------------------------------------- } customerKind="''" 则会全部显示 customerKind有值,则会根据值显示