开发者

How can I navigate my Facebook iframe with a button in javascript?

Usually one wou开发者_如何学JAVAld use:

document.location = 'http://www.mozilla.org';

or

window.frames[0].location.href = 'http://www.google.com/';

But the window and document objects dont seem to be accessible from my facebook iframe app. I even tried having an empty link getting that and calling click() on it but the <a> element doesnt support that method..


Here you go:

top.location.href = 'http://www.mozilla.org';

To change the iframe only:

location.href = 'http://www.mozilla.org';

Result:

How can I navigate my Facebook iframe with a button in javascript?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜