查询字符串是否包含某个字符

 var str='今天星期五';
 console.log(str.indexOf('星期五') !=-1) //true
 console.log(str.search('星期五') !=-1) //true
原文地址:https://www.cnblogs.com/minghan/p/14250109.html