JS判断数组中是否包含某个值

Array.prototype.S=String.fromCharCode(2); Array.prototype.in_array=function(e) { var r=new RegExp(this.S+e+this.S); return (r.test(this.S+this.join(this.S)+this.S)); } var arr=["1","2"]; alert
相关文章
相关标签/搜索