使用FCKeditor添加文章时,在文章最后多了逗号

作者:mickeyboy 来源:蓝色理想 时间:2007-10-11 13:38:00 

【问】使用FCKeditor添加文章时,在文章最后多了逗号。

【答】此情况发生在asp环境中。在asp里对于 提交的表单信息中如果有相同name属性的键值对  做‘逗号连接处理’ 你们一定是使用了这样的js方法建立了编辑器


var oFCKeditor = new FCKeditor( ’editor’ ) ;
oFCoFCKeditor.Create() ;


然后 又在同一个表单里面 添加了 一个id="editor" 或者 name ="editor"的 文本域
造成的!这样的话载入以后,实际上存在了两个 名称为editor表单控件了 所以在提交更新的时候,浏览器会出现逗号。

解决的方法是:第一种:不要在表单里面 添加 多余的 名为 editor 的文本域了

第二种:使用 fckeditor 的ReplaceTextarea()方法 :


window.onload = function()
{
       // Automatically calculates the editor base path based on the _samples directory.
       // This is usefull only for these samples. A real application should use something like this:
       // oFCKeditor.BasePath = '/fckeditor/' ;       // '/fckeditor/' is the default value.
       var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;

       var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
       oFCKeditor.BasePath       = sBasePath ;
       oFCKeditor.ReplaceTextarea() ;
}

具体的可以看 fckeditor的实例中的html实例第二个

标签:FCKeditor,文章
0
投稿

猜你喜欢

  • Python绘制散点密度图的三种方式详解

    2021-12-07 00:21:04
  • Python实现的txt文件去重功能示例

    2021-12-22 23:42:49
  • 超简单的scrapy实现ip动态代理与更换ip的方法实现

    2022-12-21 19:58:05
  • Python脚本实时处理log文件的方法

    2021-02-23 06:40:32
  • oracle中commit之后进行数据回滚的方法

    2024-01-25 01:00:53
  • python中的load、loads实现反序列化示列

    2023-04-01 23:49:56
  • pip安装路径修改的详细方法步骤

    2021-11-03 12:38:29
  • python神经网络编程之手写数字识别

    2022-01-12 20:50:04
  • jquery加载页面的方法(页面加载完成就执行)

    2024-04-23 09:10:11
  • python微信跳一跳系列之棋子定位颜色识别

    2023-01-16 04:52:49
  • 利用python如何实现猫捉老鼠小游戏

    2023-12-08 06:20:34
  • MySQL数据库线程缓冲池详解

    2012-04-13 11:48:01
  • 详解Python中的__new__()方法的使用

    2022-09-26 09:03:56
  • python实现五子棋游戏(pygame版)

    2021-09-15 16:01:42
  • php依赖注入知识点详解

    2024-05-02 17:33:00
  • Linux(Redhat)安装python3.6虚拟环境(推荐)

    2022-06-08 23:34:13
  • 白鸦:界面烂还是界面设计烂?

    2008-04-03 16:05:00
  • 再次探讨go实现无限 buffer 的 channel方法

    2024-02-10 23:34:54
  • php出现Cannot modify header information问题的解决方法大全

    2024-05-02 17:35:21
  • JavaScript判断各种浏览器类型及版本

    2008-09-29 15:17:00
  • asp之家 网络编程 m.aspxhome.com