2013-08-20 52 views
-1

在這種情況下,我想的是寫在example.com一個假想的javascript代碼返回相同的結果:我如何欺騙一個iframe頁面加載非iframe?

window.self === window.top

<html> 
<body> 
    <iframe id="you-are-not-an-iframe" src="http://example.com"></iframe> 
</body> 
</html> 
+0

你有什麼嘗試?你想顯示的內容iframe中的東西像一個div而不是彈出? – PeterPan

+0

@ user2110309我想讓OP在iframe中顯示例如google.com。 – Teemu

+0

您是否期待[殺死Iframe攻擊者](http://code-cocktail.in/iframe-buster-killer/) – Gowri

回答

0

瀏覽器的安全模型禁止你在一個框架中顯示第三方網站,同時該網站被告知它正在頂部框架中運行。順便說一下:顯示遠程頁面的框架,而他們不希望它發生,是邪惡的恕我直言。