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>