直接取你调用时设定的那个name

解决方案 »

  1.   

    请问是否要调用多个JS啊?我只调用了这个“/FCKeditor/fckeditor.js”;是它的_docs帮助里说的。
    取值的时候怎么直接取name啊?谢谢您了。
    对了,请问哪里有清楚详细的帮助啊?
      

  2.   

    对了,我下载的版本是* Version:  2.0 RC2, * Modified: 2004-12-17 08:01:56
      

  3.   

    帮助里有着两句话,请问是什么意思:
    The editor scripts source can be found in the package at the "editor/_source/" directory. It is "human readable" as well as commented. There are a lot of files there that are organized on groups.To maximize loading and execution performance, the production distribution code in compressed on fewer and smaller files, as described on "Performance". These files can be found at the "editor/js/" directory.
      

  4.   

    Constructor
    Properties
        InstanceName
        Width 
        Height 
        ToolbarSet 
        Value 
        BasePath 
        CheckBrowser 
        DisplayErrors
    Collections
        Config
    Methods
        Create
        ReplaceTextarea
    这些都没有要用的啊?
      

  5.   

    var fck = new FCKeditor();
    fck.BesePath = '/FCKeditor/'; // FCKeditor 所在目录
    fck.Instancename = 'reply'; // 表单域名称
    fck.Width = 100%; // 默认值就是 100%,可以不设置
    fck.Height = 500; // 默认值是 300,可以不设置
    fck.ToolbarSet = 'Default'; // fckconfig.js 里设置的工具样设置,默认值是 Default,可以不设置
    fck.Config['SkinPath'] = fck.BesePath + 'editor/skins/office2003/'; // 样式目录
    fck.Value = 'test text'; // 加载编辑器时里面的内容,这个版本有点问题,不能为空,否则在编辑时切换到源代码模式再返回设计模式时编辑器不能工作
    fck.Create(); // 生成编辑界面// 第二个编辑界面
    fck.InstanceName = 'content';
    fck.Value = ' '; // 因为留空会出现问题所以我加了个实名空格,注意不能用“ ”这样的空格
    fck.Create();fck = null;
      

  6.   

    ASP:
    Request.Form("reply")
    Request.Form("content")js:
    documetn.getElementById("reply");
    document.getElementById("content");
      

  7.   

    >> 我用.value或者.innerText、.outerText、这些textarea的属性都取不到,用innerHTML也不行。
    那位大侠帮帮忙啊?朋友,对textarea输入框,可以使用.value来取值。
    而.innerText、.outerText和innerHTML都不是针对text输入框的,而是针对某个区域,比如body这个区域的,使用document.body.innerHTML等等。
    >>怎么取值?
    在FCKEditor中,不是对textarea来取值的,是通过javascript来进行转化的,具体的方式大致如下:
    当在该页面发生onsubmit或者onclick事件的时候,取出来文本编辑器中的innerHTML值,然后放入到一个隐藏域里面,最后页面提交。
    于是到后面接收的页面,
    ASP使用:Request.Form("您的隐藏域名称")就可以得到你的值了。
    JSP页面中使用:request.getParameterValue("您的隐藏域名称")。
    >>还有就是怎样使用撤销功能和上传图片的功能呢?
    查看相关的javascript代码,撤销功能一般是当onclick="format1('undo');",然后在format1(str1)里面进行处理的,例如:
    document.execCommand('undo');
    上传图片更简单了,和你平时的上传是一个道理。FCKEditor目前还在发展中,里面将会有很多更新的东西。
      

  8.   

    对了,设置两个域是怎么做的,隐藏域怎么做啊?我看到的帮助里没有这些说明啊。
    这是我根据帮助写的页面:
    …………………………………………………………………………………………………………
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script type="text/javascript" src="/FCKeditor/fckeditor.js">
    </script>
    <script type="text/javascript">
          window.onload = function()
    {
    var oFCKeditor = new FCKeditor('FCKeditor1') ;   oFCKeditor.ReplaceTextarea() ;
    }
    function sub1()  
    {
    var aa=document.getElementById("FCKeditor1");
    alert(aa);

    </script>
    <title>New Page 1</title>
    </head>
    <body>
    <form action="b.jsp" method="post" id="a" >
    <textarea  name="FCKeditor1" id="FCKeditor1" rows="1" cols="20" >xcvhhfdh</textarea>
    <INPUT type=button  value="提交" onclick="sub1()" >      
    </form>     
    </body>     
    </html>     
    ……………………………………………………………………………………………………………………
    alert(aa);输出一个[object],alert(aa.value);输出一个初始值;还是没办法找出真正的值。
    我是想在客户端得到它的值,难道FCKeditor只能在提交的时候取值吗?
      

  9.   

    在FCKeditor中,页面中的FCKeditor不是textarea,而是iframe。