iframe传值和自适应高度
2008-01-17 20:23
148 查看
iframe传值
用于跳转页面的同时,向多个框架传值
<body onload="document.paimai.location.href='paimai_frame_all.asp?id=<%=request("id")%>'" >
paimai为框架标识
iframe自适应高度
<script>
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;
}
}
}
</script>
用法:win 为iframe标识
<iframe width="778" align="center" height="200" id="win" name="win" onload="Javascript:SetWinHeight(this)" frameborder="0" scrolling="no"></iframe>
用于跳转页面的同时,向多个框架传值
<body onload="document.paimai.location.href='paimai_frame_all.asp?id=<%=request("id")%>'" >
paimai为框架标识
iframe自适应高度
<script>
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;
}
}
}
</script>
用法:win 为iframe标识
<iframe width="778" align="center" height="200" id="win" name="win" onload="Javascript:SetWinHeight(this)" frameborder="0" scrolling="no"></iframe>
相关文章推荐
- iframe自适应高度的多种方法方法小结
- iframe自适应高度
- iframe自适应高度,多层嵌套iframe自适应高度的解决方法
- 网页布局中iframe高度自适应问题总结
- iframe自适应高度 iframe
- iframe自适应高度
- 实现iFrame自适应高度,原来很简单!
- Iframe自适应高度
- 【转】真正的iframe高度自适应(兼容IE,FF,Opera)
- 真正解决iframe自适应高度
- iframe自适应高度
- 嵌套自适应调整所有iframe的高度
- jquery ajax应用中iframe自适应高度问题解决方法
- 实现iFrame自适应高度
- iframe高度自适应。
- JS实现iframe框架自适应高度
- 再谈iframe自适应高度
- 跨域IFRAME自适应高度(子页面TAB切换不同的高度,主页面IFRAME嵌套子页面自适应高度)
- 三谈Iframe自适应高度[转自口碑网UED博客]
- 实现iframe自适应高度,原来很简单!