<iframe id=demo src='about:<a href="about:<div style=height:1000>">test.html</a>'></iframe>
<script>
setInterval("document.all.demo.height=demo.document.body.scrollHeight+20",100);
</script>
<script>
setInterval("document.all.demo.height=demo.document.body.scrollHeight+20",100);
</script>
function onDownloadDone(s) { treeDiv.innerHTML =s; }
</SCRIPT><IE:Download ID="oDownload" STYLE="behavior:url(#default#download)" /><input type=button value="点击此处查看树状结构" onclick="javascript:oDownload.startDownload('tree.htm',
onDownloadDone)">
<div id="treeDiv"></div>
这样就不存在同步的问题.
parent.document.all.tags("IFRAME")(index).height=document.body.scrollHeight
这里index就是该子document被嵌入的相应的父文档的iframe标记索引.
<script>
window.resizeTo(160,document.body.scrollHeight);
</script>这段代码切记加在树状菜单页面的最下面!!下面。最下面!
我曾经放在最上面,结果高度不正确。:)
你的方法应该只能用于IE5.5+,印象中