js replace替换所有字符

'abc...'.replace(new RegExp('oldStr', 'gm'), 'newStr')

 

posted @ 2017-01-19 16:32  chenjingchun  阅读(376)  评论(0编辑  收藏  举报