这是我混合js写的(我也是菜鸟),楼主看看吧,也许有起发,前台还是要js写比较好<?php$conn=@mysql_connect("localhost","root","")ordie("数据库链接错误");mysql_select_db("bbs",$conn);mysql_query("setnames'GBK'");//使用GBK中文编码;functionhtmltocode($text){$text=str_replace("\n","<br/>",str_replace(""," ",$text));return$text;}if($_POST['submit']){$sql="insertintomessage(id,user,titl...