Problem Description:
Many times I may write a iframe page with only a DataGrid, this time there is a requirement: 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, The length width of IFRAME cannot be fixed.
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)
}