mymsg=mymsg.replace(/<\/?.+?>/g,"");//html2txt 去掉html标记 mymsg=mymsg.replace(/\n|\r/g,""); //去掉换行 转载于:https://www.cnblogs.com/jerryLee/archive/2010/02/01/1661036.html