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" ></iframe>

相关文章:

  • 2021-10-10
猜你喜欢
  • 2021-12-12
  • 2021-06-12
  • 2021-07-28
  • 2022-12-23
  • 2021-12-12
  • 2021-12-12
相关资源
相似解决方案