Enable the iframe framework webpage to automatically scale under any browser

Source: Internet
Author: User

The method is as follows:
Save as prompted.
Save as mainframe.htm
Copy codeThe Code is as follows:
<Html>
<Body>
<Div>
<Iframe marginwidth = "0" marginheight = "0" hspace = "0" vspace = "0" frameborder = "0"
Id = "frametb" scrolling = "no" src = "frame.htm"
Onload = "style.width?this.content=doc ument. all. formfra. offsetWidth ;"
+ "Style.height?this.content=doc ument. all. formfra. offsetHeight"> </iframe>
</Div>
</Body>
</Html>

Save as frame.htm
Copy codeThe Code is as follows:
<Html>
<Body leftmargin = "0" topmargin = "0">
<Table id = formfra width = 200 border = 0 bgcolor = green>
<Tr> <td>
Hu Dongping online space
<P/>
Sfsfere
</Td> </tr>
</Table>
</Body>
</Html>


Execute mainframe.htm to see the effect.
When modifying a set, define the table ID in mainframe.htmand frame.htm, and remember to modify the corresponding
Call the file name and path, and pay attention to the following sentence:
Copy codeThe Code is as follows:
Onload = "style.width?this.content=doc ument. all. formfra. offsetWidth ;"
+ "Style.height?this.content=doc ument. all. formfra. offsetHeight"

Modify
Copy codeThe Code is as follows:
This.contentdomaindoc ument. all. Call the page table ID. offsetWidth
This.contentdomaindoc ument. all. Call the page table ID. offsetHeight

Remember, you must define the table ID.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.