<SCRIPT type = "text/JavaScript">
// Framework self-application height
Function Dyniframesize (down) {
VaR ptar = NULL;
If (document. getelementbyid ){
Ptar = Document. getelementbyid (down );
}
Else {
Eval ('ptar = '+ down + ';');
}
If (ptar &&! Window. Opera ){
// Begin resizing IFRAME
Ptar. style. Display = "Block"
If (ptar. contentdocument & ptar. contentdocument. Body. offsetheight ){
// Ns6 syntax
Ptar. Height = ptar. contentdocument. Body. offsetheight + 20;
Ptar. width = ptar. contentdocument. Body. scrollwidth + 20;
}
Else if (ptar. Document & ptar. Document. Body. scrollheight ){
// Ie5 + syntax
Ptar. Height = ptar. Document. Body. scrollheight;
Ptar. width = ptar. Document. Body. scrollwidth;
}
}
}
</SCRIPT>
Set in ifram:
<IFRAME Style = "vertical-align: Top; padding-left: 0px; Height: 447px; width: 720px;
Background-color: # eaeeed"Onload = "javascript: dyniframesize ('workspace ');" Id = "workspace"
Marginwidth = "0" scrolling = "no" frameborder = "0" name = "ifram" src = "companymanage. aspx">
</Iframe>
The above method is;
The following method is not restricted by the height you set:
<SCRIPT type = "text/JavaScript">
If (window! = Top) top. Location = Window. location;
// Adjust the size of the table ‑ topframe so that the IFRAME workspace does not display a scroll bar.
Function workspaceload (){
VaR H = workspace.doc ument. Body. scrollheight;
If (h> 450)
Parent. Partition topframe. Height = h;
Parent.doc ument. All. workspace. style. Height = h;
}
</SCRIPT>
Set on a table with a frame:
<Table width = "100%" id = "comment topframe">
<Tr>
<TD>
<IFRAME Style = "vertical-align: Top; padding-left: 0px; width: 725px;
Background-color: # eaeeed "id =" workspace "onLoad =" javascript: workspaceload ();"
Marginwidth = "0" scrolling = "no" frameborder = "0" name = "ifram" src = "companymanage. aspx">
</Iframe>
</TD>
</Tr>
</Table>
but both methods are limited by the first width, that is, when you are on the same page, there are different operations, and the first operation shows less content, the second operation shows a lot of content. If you operate the first operation, the page framework will not be automatically applied when you operate the second operation. This problem has been stuck for a long time, if you know how to handle this problem, please share it. Thank you very much,