设为首页   |  加入收藏夹 快速导航:  热门文章  |  最新文章  |  梦想博客  
当前位置:编程之家 -> 文章频道 ->html 
站内搜索:  

FCKeditor结尾出现逗号的问题

作者:绯雨 来源:互联网 整理日期:2008-05-05

由于在原表单已添加了一个表单域,再用fckeditor创建了一个同名的表单域,提交时就出现了逗号。如下:

<textarea name="Content"></textarea>
<script type="text/javascript">
var oFCKeditor = new FCKeditor( Content) ;
oFCKeditor.BasePath = /;
oFCKeditor.ToolbarSet = Default ;
oFCKeditor.Width = 100% ;
oFCKeditor.Height = 400 ;
oFCKeditor.Value = ;
oFCKeditor.Create();
</script>

如上,由于已存在一个名为Content的文本域,随后又用fckeditor的Create方法创建了个名为Content的文本域,将出现提交表单后出现逗号的问题。

解决方法1:

使用上面的JS创建,并且把<textarea name="Content"></textarea>去掉即可。

解决方法2:

将上面代码中的oFCKeditor.Create()换成oFCKeditor.ReplaceTextarea()。