FCKeditor结尾出现逗号的问题

由于在原表单已添加了一个表单域,再用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()。


我在 jsp 中使用,没有找到解决方法2的方法。
原文地址:https://www.cnblogs.com/jamin/p/1233215.html