用的MAC 系统
1. 在JS内将\n 替换成
var reg=new RegExp("\n","g");
content= content.replace(reg,"<br/>");
2. 存入数据库后拿出, 用PHP将<br/>替换成\n
$search = "<br/>";
$replace = "\n";
$content = str_replace($search,$replace,$content);
用的MAC 系统
1. 在JS内将\n 替换成
var reg=new RegExp("\n","g");
content= content.replace(reg,"<br/>");
2. 存入数据库后拿出, 用PHP将<br/>替换成\n
$search = "<br/>";
$replace = "\n";
$content = str_replace($search,$replace,$content);