[問題] 取得iframe content (cross-domain)

看板Web_Design作者 (herbacin)時間9年前 (2015/12/08 18:00), 9年前編輯推噓0(003)
留言3則, 2人參與, 最新討論串1/1
請問一下各位如果不使用ajax或後端curl技術, 有沒有可以用javascript 取得cross-domain的page內容 比如說我的網頁如下 : <html> <iframe src="http://www.kimo.com.tw" id="yahoo"></frame> <div id="show"></div> </html> 可否用javascript取得iframe的content, 然後將content顯示到show div裡面 我大致使用了一下, 會有xss的問題js會報錯誤, 不知有沒有大大可以做到 ? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.163.122.55 ※ 文章網址: https://www.ptt.cc/bbs/Web_Design/M.1449568856.A.ACB.html ※ 編輯: herbacin (118.163.122.55), 12/08/2015 18:01:09

12/08 19:00, , 1F
不可能,如果有就是超嚴重0day
12/08 19:00, 1F

12/08 23:49, , 2F
那可否用js取得這個頁面所有載入過的檔案
12/08 23:49, 2F

12/08 23:49, , 3F
包含iframe載入過的檔案
12/08 23:49, 3F
※ 編輯: herbacin (114.34.181.227), 12/08/2015 23:49:48
文章代碼(AID): #1MPgfOhB (Web_Design)
文章代碼(AID): #1MPgfOhB (Web_Design)