开发者

redirect an iframe

开发者 https://www.devze.com 2022-12-16 03:14 出处:网络
is it possible to redirect an iframe to display the content of the frame after 2 seconds in a full window(same window, not a new one). 开发者_JS百科I hope for a PHP solution.You\'re going to need to u

is it possible to redirect an iframe to display the content of the frame after 2 seconds in a full window(same window, not a new one). 开发者_JS百科I hope for a PHP solution.


You're going to need to use a client side language for that - namely JavaScript.

Here's a start

setTimeout(function() {

    var frameElement = document.getElementById('my-iframe');
    // get iframe URL
    // window.open(iFrameUrl, '_self');

}, 2000);


Looks like you can use the location property of the 'top' object in JavaScript.

This link seems to describe this approach more fully.

0

精彩评论

暂无评论...
验证码 换一张
取 消