通過ifame指向的頁面高度調(diào)整iframe的高度
更新時間:2006年10月05日 00:00:00 作者:
通過ifame指向的頁面高度調(diào)整iframe的高度
1.htm的代碼:
<iframe src=2.htm id=ifrm></iframe>
2.htm的代碼:
<script>
function resize()
{parent.document.all.ifrm.height=document.body.scrollHeight;
parent.document.all.ifrm.width=document.body.scrollWidth;
}
</script>
<body onload="resize()">
</body>
1.htm的代碼:
<iframe src=2.htm id=ifrm></iframe>
2.htm的代碼:
<script>
function resize()
{parent.document.all.ifrm.height=document.body.scrollHeight;
parent.document.all.ifrm.width=document.body.scrollWidth;
}
</script>
<body onload="resize()">
</body>
相關(guān)文章
select列表內(nèi)容交換的js實現(xiàn)代碼
js實現(xiàn)左右select列表內(nèi)容交換傳遞,原來就是先獲取當期選中select的值,然后添加到對面的select中,然后刪除選中內(nèi)容。2009-12-12用 Javascript 驗證表單(form)中的單選(radio)值
在用 Javascript 驗證表單(form)中的單選框(radio)是否選中時,很多新手都會遇到問題,原因是 radio 和普通的文本框在獲取值的時候有很大不同.2009-09-09javascript獲得光標所在的文本框(text/textarea)中的位置
移動鼠標,得到單元格所在表中的位置的js代碼,測試兼容firefox,需要的朋友可以參考下。2009-12-12