2017-01-11 29 views
-1

在Chrome瀏覽器中,我的網站的iframe加載失敗,但在Firefox上正常工作。如何解決在Chrome瀏覽器上的跨源幀加載問題?

PFA快照的錯誤消息:在鉻

enter image description here

錯誤消息:

未捕獲的拋出:DOMException:訪問一個跨來源幀阻止與原籍 「http://localhost:9001」 的幀。 在Object.FCKTools.FixDocumentParentWindow(http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:42291) 在Object.FCKTools.FixDocumentParentWindow(http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:42372) 在Object.FCKTools.FixDocumentParentWindow(http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:42372) 在Object.FCKTools.GetDocumentWindow(http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:42168) 在Object.FCKTools.GetElementWindow(http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:42032) 在FCKToolbarFontSizeCombo.FCKToolbarSpecialCombo.Create(http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:204406) 在FCKToolbar.Create(http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:220569) 在FCKToolbarSet.Load(http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:225568) 在LoadToolbar(http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/fckeditor.html?InstanceName=z_1t_ld5!ed:194:15) 在Object.StartNext(1:1:644)

警告在Firefox:

在主線程同步的XMLHttpRequest是因爲其所帶來的影響最終用戶的體驗棄用。更多幫助http://xhr.spec.whatwg.org/

不知道爲什麼這裏會出現交叉錯誤,因爲協議,域和端口在兩個地方都是相同的。

回答

0

可能的原因:

1)服務器阻止內容在iframe中打開。在服務器上實施。 2)CORS。在服務器上實施。