How to make the IFRAME's long width and content automatically adapt to the size

xiaoxiao2021-03-06  74

By Ben

Problem Description:

Using IFRAME, many times may be required: How to make the IFRAME's long-width and content, such as ASP.NET, only a DataGrid list, due to the number of rows of DataGrid, can not secure the length width of IFRAME.

Solution:

Use a Window.resizEther method in the ASP.NET page in IFRAME:

For example, DataGrid's ID is Grid, Write JavaScript:

Function window.onload ()

{

Var Grid = Document.GtelementByid ("

Grid ");

WINDOW.Resizeto (Grid.offSetWidth, Grid.OffsetHeight)

}

转载请注明原文地址:https://www.9cbs.com/read-108560.html

New Post(0)