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:
精彩评论