网页table 中的怎么插入 iframe
来源:互联网 发布:计算机有多少端口 编辑:程序博客网 时间:2024/05/20 06:06
如果何能使iframe的大小随着它包含的网页里面的table大小变化而变化?急切!!!
http://www.blue1000.com/AskPro/js/index.html
例如,怎样使iframe的高度和宽度 随着table的高度和宽度 改变而改变?如下:
Main.htm
<html>
<body>
<div>
<iframe name=mm src=”detail.htm” width=”变数” height=”变数” </iframe>
</div>
</body>
</html>
detail.htm
<html>
<body>
<table width=”变数” height=”变数” border=0 bgcolor=red>
<tr><td></td></tr>
</table>
</body>
</html>
急切,请高手快指点!!!!
---------------------------------------------------------------
main.htm
<html>
<body>
<div>
<iframe id=frmDetail scrolling=no name=mm src="detail.htm" style="width:expression(this.contentWindow.document.all.tblDetail.width);height:expression(this.contentWindow.document.all.tblDetail.height)"></iframe>
<button onclick="with(document.all.frmDetail.contentWindow.document.all.tblDetail){width=offsetWidth+1}">+</button>
<button onclick="with(document.all.frmDetail.contentWindow.document.all.tblDetail){width=offsetWidth-1}">-</button>
</div>
</body>
</html>
detail.htm
<html>
<body leftmargin=0 topmargin=0>
<table id=tblDetail width=100 height=100 border=0 bgcolor=red>
<tr><td></td></tr>
</table>
</body>
</html>
---------------------------------------------------------------
稍微变通一下就是啦.
main.htm
<html>
<body>
<div>
<iframe id=frmDetail scrolling=no name=mm src="tb.htm" onload="style.width=this.contentWindow.document.all.tblDetail.offsetWidth;style.height=this.contentWindow.document.all.tblDetail.offsetHeight"></iframe>
</div>
</body>
</html>
tb.htm
<html>
<body leftmargin=0 topmargin=0>
<table id=tblDetail width=100 height=100 border=0 bgcolor=red>
<tr><td>
dddddddddddddddddddddddddddddddddddddddddddddddddddddddd
</td></tr>
</table>
</body>
</html>
---------------------------------------------------------------
test.asp
<%
url=Request.QueryString("url")
%>
<body onload="document.all.ifId.style.width=parseInt(ifId.document.getElementsByTagName('table')[0].width)+20">
<iframe name=ifId id=ifId src="<%=url%>"></iframe>
<br>
<a href=2.asp?url=1.asp>1.asp</a>
<br>
<a href=2.asp?url=2.asp>2.asp</a>
1.asp
<table width=500>
<tr><td>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
</table>
2.asp
<table width=200>
<tr><td>
aaaaaaaaa
</table>
http://www.blueidea.com/tech/web/index.asp
- 网页table 中的怎么插入 iframe
- 在asp网页中,只刷新iframe子页面中的内容,并传值过去,怎么实现呀!
- 在asp网页中,只刷新iframe子页面中的内容,并传值过去,怎么实现呀!
- 在网页中怎么插入天气预报?????急急
- 网页中怎么插入flash的代码
- 判断Iframe中的网页是否加载成功
- IFRAME如何调用网页中的部分内容-解决方案
- 关于网页中插入iframe中自适应问题的解决
- 在框架(iframe)中怎么动态显示网页
- 网页中的虚线怎么做?
- 导出网页中的table到excel
- [JSP]导出网页中的table到excel
- [JSP]导出网页中的table到excel
- [JSP]导出网页中的table到excel
- JSP 导出网页中的table到excel
- [JSP]导出网页中的table到excel
- 导出网页中的table到excel
- 将网页中的table导入excel2007
- CellPainting事件,一般用于合并单元格用
- 几点关于学习的思考
- 转载: Sybase 365为银行提供iPhone应用程序
- 在GridView中如何格式化Money型字段
- 使用 TightVNC 从 Windows 远程连接 Ubuntu 9.10
- 网页table 中的怎么插入 iframe
- Tomcat5.5 尚未授予访问 Tomcat 服务器的权限
- 常用的CSS命名规则
- DataGridView合并单元格 编辑单元格
- mfc: from 'LPCSTR' to 'LPCWSTR'
- C#资源
- 从国内两大通信巨头“间谍战”来看企业内网安全管理需求
- 使用 Linux 系统调用的内核命令
- ASP.NET+Ajax+Javascript实现页面定次刷新滚动内容