判断字符是否存在一个字符串中的方法

var engine= data.searchengine;//字符串
 $(WBsites).each(function(i,obj){
 if( eval('/,?'+id+',?/').test( engine ) ){
    obj = jQuery.extend(obj,{isselect: "is"});
     }
 });

你可能感兴趣的:(判断字符是否存在一个字符串中的方法)