jeanie0108 2010-08-05 15:11
浏览 250
已采纳

关于FCKeditor_OnComplete的问题

function FCKeditor_OnComplete(editorInstance){             
         editorInstance.Events.AttachEvent("OnFocus",FCKeditor_OnFocus);          
}   
        
function FCKeditor_OnFocus(editorInstance){
    parent.insert("frame");
}

 使用FCK后,想在FCK获得光标的时候,做一些事情,于是用到了FCKeditor_OnComplete这个方法,但是为什么下面的这个在FF下不能运行呢

editorInstance.Events.AttachEvent("OnFocus",FCKeditor_OnFocus);
  • 写回答

1条回答 默认 最新

  • kjah_1 2010-08-05 15:54
    关注

    ff下注册事件用addEventListener

    var o=editorInstance.EditorDocument;
    if(o.attachEvent){
    o.attachEvent("onfocus",FCKeditor_OnFocus);
    }else{
    o.addEventListener("focus",FCKeditor_OnFocus,false);
    }

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?