how can I (cross-browser compatible) maximize an iFrame so that it appears to be the page in the URL bar even though it is served from a different server?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- Adding a timeout to a render function in ReactJS
You could set the width and height of the parent page's
html
andbody
tags to 100%, as well as theiframe
tag that contains the page you want to load.I guess this ought to work:
Edit 1: You could just hide the scrollbars of the page, with the HTML and scroll=no directive
(that solution should be multi-browser)
Edit 2: Now even XHTML proof ;)
Edit 3: And finally w3 validator ok
(be sure to add scroll=no in the BODY if you run in Internet Explorer compatibility problems)
Use javascript with the event body load to set iframe height & width to window height & width.
For example in jquery :
Tested on FF, IE and GC