var aa = "bbmemorycc"; var i = aa.indexOf("memory"); if(i>-1){ 表示存在 } 转载于:https://www.cnblogs.com/xiao-fy/p/5164367.html