var arr = [ "xml", "html", "css", "js" ];  
  1. $.inArray("js", arr);  //返回 3,
  2. 如果不包含在数组中,则返回 -1;

相关文章: