通過ifame指向的頁面高度調(diào)整iframe的高度
更新時(shí)間: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實(shí)現(xiàn)代碼
js實(shí)現(xiàn)左右select列表內(nèi)容交換傳遞,原來就是先獲取當(dāng)期選中select的值,然后添加到對(duì)面的select中,然后刪除選中內(nèi)容。2009-12-12用 Javascript 驗(yàn)證表單(form)中的單選(radio)值
在用 Javascript 驗(yàn)證表單(form)中的單選框(radio)是否選中時(shí),很多新手都會(huì)遇到問題,原因是 radio 和普通的文本框在獲取值的時(shí)候有很大不同.2009-09-09javascript radio 聯(lián)動(dòng)效果
js聯(lián)動(dòng)效果實(shí)現(xiàn)代碼2009-03-03javascript獲得光標(biāo)所在的文本框(text/textarea)中的位置
移動(dòng)鼠標(biāo),得到單元格所在表中的位置的js代碼,測(cè)試兼容firefox,需要的朋友可以參考下。2009-12-12