MDUI
首页
注册

JS如何获取iframe的页面信息?

BGS
Burger Studio - 虚拟稽
2021-07-19 18:33:44

在页面中加入一个iframe标签(id也为iframe),怎样用JS获取iframe的页面标题、图标等信息?

百度查找了一些方法,发现报错(如图)。

信息:Uncaught SecurityError: Blocked a frame with origin "null" from accessing a frame with origin "https://cn.bing.com". The frame requesting access has a protocol of "file", the frame being accessed has a protocol of "https". Protocols must match.

resize,m_lfit,w_702,h_0,limit_1
错误日志