Jquery inArray的使用


var typeList=["A","B","C","D"];
if ($.inArray("A", typeList)==-1){
     //不存在
}else{
   //存在
}

原文地址:https://www.cnblogs.com/krisy/p/3873706.html