【JS】字符串操作 【包含】 var str = "123"; console.log(str.indexOf("3") != -1 );【替换】 str.replace(/需要替换的字符串/g,"新字符串"); 【多是百度所得 用于个人总结 若有原著作者 我就给它密了】