js代码:
function
SetWinHeight(obj){
var
win=obj;
if
(document.getElementById)
{
if
(win && !window.opera){
if
(win.contentDocument && win.contentDocument.body.offsetHeight)
win.height = win.contentDocument.body.offsetHeight;
else
if
(win.Document && win.Document.body.scrollHeight)
win.height = win.Document.body.scrollHeight;
}
}
}
html代码:
<
iframe
src
=
"<{spUrl c=main a=indexRight}>"
name
=
"pindex"
id
=
"pindex"
allowtransparency
=
"true"
frameborder
=
"0"
scrolling
=
"no"
style
="
width
:
740px
;
min-height
:
860px
;
_height
:
400px
;
margin
:
0
;"
onload="SetWinHeight(this)"
>
</
iframe
>