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