default.aspx页面里
<script>
function dyniframesize(iframename) 
{
   var pTar = null;
   if (document.getElementById)
  {
    pTar = document.getElementById(iframename);
   }
   else{
eval('pTar = ' + iframename + ';');
        }
   if (pTar && !window.opera){
//begin resizing iframe
    pTar.style.display="block"
    
   if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight){
//ns6 syntax
pTar.height = pTar.contentDocument.body.offsetHeight+10; 
}
else if (pTar.Document && pTar.Document.body.scrollHeight){
//ie5+ syntax
pTar.width = pTar.Document.body.scrollWidth;
pTar.height = pTar.Document.body.scrollHeight;
      
}
}
}
</script><body onload="dyniframesize('iframe1')">打开default.aspx的时候,iframe自适应大小了。
现在是:
iframe里的有个查询按钮,查询后我也需要让它适应大小,否则有时候数据被遮住了。
查询按钮里应怎么写一下代码?