mediumtext类型在用javascript调用时对回车敏感怎么办?
aqiu 2003-10-09 10:23:07 $text = htmlspecialchars($text);
$text = str_replace("\n", "<br>", $text);
$text = str_replace(" ", " ", $text);
echo "document.write(\"<table width=100% border=1 cellpadding=0 cellspacing=0 bordercolor=#999999 class=text><tr bgcolor=#CCCCCC><td width=14%>作者</td><td width=86%>内容</td></tr><tr><td>$row[reviewuser]<br>$date<br></td><td>$text</td></tr></table><br>\");\n";
这么写的调用语句,用javascript在html页面里调用
只要text里有回车就不能显示
text在mysql里的类型是mediumtext
为什么呢?