我不知道我哪里出了问题。在其他浏览器中,它工作正常:
function main__pageeditor_new_body_SetUrl()
{
function getUrlParam(parentObject, paramName)
{
var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i') ;
var match = parentObject.location.search.match(reParam) ;
return (match && match.length > 1) ? match[1] : '' ;
}
var funcNum = getUrlParam(this, 'CKEditorFuncNum');
this.opener.CKEDITOR.tools.callFunction(funcNum, arguments[0]);
}
但是在 IE 中你会得到这个错误:
'this.opener.CKEDITOR' 为空或不是对象
为什么这行不通?
最佳答案
对于任何想知道的人 - 这有很大帮助:
http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_(Uploader)/Custom_File_Browser
关于javascript - Window.opener 在 IE8 中未定义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11327723/