js、jquery中全局替换replace

str.replace(/需要替换的/g,"新字符串")

//此处使用正则表达式

posted @ 2019-01-21 18:46  墨问前程  阅读(931)  评论(0编辑  收藏  举报