jquery判斷字符串中是否存在某個的字符串

有兩種方式: 1)test 2)indexOfjavascript $(function(){   var str="sunny,woo";   var sear=new RegExp(',');   if(sear.test(str)){   alert('Yes');   }   var tag=',';   if(str.indexOf(tag)!=-1){   alert(
相關文章
相關標籤/搜索