zoukankan      html  css  js  c++  java
  • 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的方法。
  • 相关阅读:
    编程经验
    GIS业务逻辑
    算法逻辑
    js中arguments的作用
    C#基础及记忆概念
    POI创建Excle
    数据库元数据分析Demo
    c3p0写连接池 Demo
    dbutils的使用Demo
    dbcp写连接池 Demo
  • 原文地址:https://www.cnblogs.com/jamin/p/1233215.html
Copyright © 2011-2022 走看看