var msg='A|B|C|D|E|F|G';
方式1:
var newMsg=msg.replace("|","");
方式2:
ps:适用特殊字符
var newMsg2 = msg .replace(new RegExp("<br />","gm"),"<br/>")