解決的方法:
1.在 ueditor/dialogs/internal.js 加入 document.domain = '根域名';
2.在當前頁面同樣指定根域名:
這樣在 chrome、firefox 下沒有問題,但在 ie 下還需要簡單修改下 UEditor,在 editor.js 中找到:
this._setup( container.firstChild.contentWindow.document );
在它上邊加入下邊的代碼:
接下來找到:
me.document = doc;
在它下邊加入:
me.document.domain='根域名';
到這里就解決了 UEditor 跨域傳圖片的問題,希望對大家有所幫助。
作者:東奎
|
新聞熱點
疑難解答