var str = "abcadeacf";var str1 = str.replace("a", "o");alert(str1);// 打印结果: obcadeacfvar str2 = str.replace(/a/g, "o");alert(str2);//打印结果: obcodeocf,