如何让Iframe根据页面内容自动调整大小而不出现滚动条呢? 得出当前页面的width和height在当前页面的resize事件中调整iframe的width和height 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 表格的宽度用百分比表示不行的,iframe还是会出现滚动会shit.. 建议你还是控制iframe里面页面的宽度。或者做一个用户控件,不用iframe 目前我的做法是每100毫秒就就调整一下iframe的高度和宽度》 <script>function toppage(){ if (self.location!=top.location){ parent.document.all(self.name).height = document.body.scrollHeight; } }</script><body leftmargin="0" topmargin="0" onload="toppage()">(Iframe里面加载的页面中加上上面的代码,另外不要忘了给Iframe定个名字) zheng_hz(鸿鹄) 兄,能否具体点?? <iframe style="width:100%;height:100%;" scrolling="no"></iframe> iframe.html<html><head></head><body><IFRAME ID=IFrame1 FRAMEBORDER=0 SCROLLING=NO src="b.htm"></IFRAME></body></html>b.html<html> <head> <body > 很多内容的内面 </body></html> 主页面<html><head></head><body><IFRAME ID=IFrame1 FRAMEBORDER=0 SCROLLING=NO src="XXXX.htm"></IFRAME></body></html>XXXX.htm<html><head></head><body></body></html>b.html<html> <head> <script>function toppage(){ if (self.location!=top.location){ parent.document.all(self.name).height = document.body.scrollHeight; } }</script><body leftmargin="0" topmargin="0" onload="toppage()"></body></html> http://expert.csdn.net/Expert/topic/2567/2567731.xml?temp=.2231256 meizz(梅花雪) 给出一个做法。。 CustomTextBox自定义日历控件使用的一个问题,郁闷一个下午 判断在线人数和他们是谁的问题? 上传图片的时候遇到的问题 高手帮忙解决一下啊 跪求:简单的加密算法 请教有关treeview的问题! 刚接触XML,请教一个简单的问题 关于ActiveX控件的问题! 打印页面! 如何摆脱runat=server? 求上传,与下载文件的源代码C#,30分钟后结帐. dataGrid如何求合计? 为什么在DataGrid可以传递参数,在DataList里就是空值呢
或者做一个用户控件,不用iframe
function toppage(){
if (self.location!=top.location){
parent.document.all(self.name).height = document.body.scrollHeight;
}
}
</script>
<body leftmargin="0" topmargin="0" onload="toppage()">
(Iframe里面加载的页面中加上上面的代码,另外不要忘了给Iframe定个名字)
<html>
<head>
</head>
<body>
<IFRAME ID=IFrame1 FRAMEBORDER=0 SCROLLING=NO src="b.htm"></IFRAME>
</body>
</html>
b.html
<html>
<head>
<body > 很多内容的内面 </body>
</html>
<head>
</head>
<body>
<IFRAME ID=IFrame1 FRAMEBORDER=0 SCROLLING=NO src="XXXX.htm"></IFRAME>
</body>
</html>XXXX.htm<html>
<head>
</head>
<body>
</body>
</html>
b.html
<html>
<head>
<script>
function toppage(){
if (self.location!=top.location){
parent.document.all(self.name).height = document.body.scrollHeight;
}
}
</script>
<body leftmargin="0" topmargin="0" onload="toppage()"></body>
</html>
meizz(梅花雪) 给出一个做法。。