Open chenjf5 opened 7 years ago
字符串替换,如果“abCDdasd我是”,把bc替换成bc,"abCDdasd我是"
let pattern = new RegExp("(" + term + ")", "gi"); str = str.replace(pattern, "<em>$1</em>");
字符串替换,如果“abCDdasd我是”,把bc替换成bc,"abCDdasd我是"