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有值,則會根據值顯示