var str = 'yinMinFeng'; var result = str.replace(/n/g,"ss"); //注意那个'g'全局 console.log(result); //yissMissFessg