js replace替换所有字符

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

 

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