好办!:)
<IFRAME SRC="/cei/如何策划和进行变革.htm" marginwidth="0" marginheight="0" SCROLLING="no" FRAMEBORDER="0" style="height:expression(this.document.body.clientHeight);width:expression(this.document.body.clientWidth)"></IFRAME>
<IFRAME SRC="/cei/如何策划和进行变革.htm" marginwidth="0" marginheight="0" SCROLLING="no" FRAMEBORDER="0" style="height:expression(this.document.body.clientHeight);width:expression(this.document.body.clientWidth)"></IFRAME>
function parentIframeHeight()
{
if(top.location != self.location)
{
var a = window.parent.document.getElementsByTagName('iframe');
for (var i=0; i<a.length; i++)
{
if (a[i].name == self.name)
{
a[i].height = document.body.scrollHeight; return;
}
}
}
}
window.onload = parentIframeHeight;当这个网页里有高度变化的时候可以再次调用此函数来调整高度.
还需怎样改?
<IFRAME SRC="/cei/如何策划和进行变革.htm" marginwidth="0" marginheight="0" SCROLLING="no" FRAMEBORDER="0" style="height:expression(this.document.body.clientHeight);width:expression(this.document.body.clientWidth)"></IFRAME>
<IFRAME SRC="/cei/如何策划和进行变革.htm" marginwidth="0" marginheight="0" SCROLLING="no" FRAMEBORDER="0" style="height:expression(this.document.body.clientHeight);width:expression(this.document.body.clientWidth)"></IFRAME>
http://expert.csdn.net/Expert/topic/868/868840.xml?temp=.4932825
我这样试了一下不行
<IFRAME id=myframe SRC="/ca/如何.htm" marginwidth="0" marginheight="0" SCROLLING="no" FRAMEBORDER="0" width='100%'></IFRAME>
<script>
function parentiframe()
{ var H;
H=document.body.scrollHeight+document.body.clientHeight;
myframe.height=H;
alert(myframe.height);
}
window.onload =parentiframe;
</script>