2010-11-25 73 views

回答

1

设法找到用词的一些提示到底什么。即使在FCKeditor 2.0上,如何做一个onkeypress。您需要在调用编辑器代码后加载此JavaScript:

function FCKeditor_OnComplete(editorInstance){ 
    if (document.all) {  // If Internet Explorer. 
     editorInstance.EditorDocument.attachEvent("onkeydown", function(event){alert('key was pressed');}) ; 
    } else {    // If Gecko. 
     editorInstance.EditorDocument.addEventListener('keypress', function(event){alert('key was pressed')}, true) ; 
    } 

} 
相关问题