Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道我怎么知道我的网站嵌入在 iFrame 中并删除 iFrame 以像往常一样在地址栏中使用 url 加载我的网站!
就像这个:
<iframe src="http://varzesh3.com"></iframe>
self你可以很容易地通过评估and来实现这一点top,然后使用replace()打破框架:
self
top
replace()
if (self !== top) top.location.replace(self.location.href)