function inArray(needle,array,bool){
if(typeof needle=="string"||typeof needle=="number"){
var len=array.length;
for(var i=0;i<len;i++){
if(needle===array[i]){
if(bool){
return i;
}
return true;
}
}
return false;
}
}
js实现php inarray效果
最新推荐文章于 2025-07-25 17:16:14 发布
