javascript 能不能改变frame 的大小

jk325 2004-07-02 03:47:59
把一个页面用frame,分成上中下,三个部分后,

我想动态改变三个frame的大小,

能不能这样做,,过来人,指点一下..

...全文
138 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
wanghr100 2004-07-05
  • 打赏
  • 举报
回复
top是指向框架的顶层.

资料
HTML
http://vip.5d.cn/friday/upload/dhtml html&css.chm
kingdomzhf 2004-07-05
  • 打赏
  • 举报
回复
顶层窗口对象
MSDN的library
JackyWu2003 2004-07-05
  • 打赏
  • 举报
回复
请教一下,top.document.all..中的top是什么对象指令?它是指什么的?应该看什么参考资料才有相关的材料?恳请赐教,谢谢。
wanghr100 2004-07-03
  • 打赏
  • 举报
回复
demo.htm

<iframe src="index_top.htm" trusted="yes" application="no" id="index_top" width="800" height="50" ></iframe>
<iframe src="index_main.htm" trusted="yes" application="no" id="index_main" width="800" height="521"></iframe>
<iframe src="index_bottom.htm" trusted="yes" application="no" id="index_bottom" width="800" height="29"></iframe>


index_top.htm
top

index_main.htm

<input type=button onclick="Hidden()" value="隐藏">
<input type=button onclick="Show()" value="显示">

<script>
function Show()
{
top.document.all["index_top"].style.height="50";
top.document.all["index_main"].style.height="521";
top.document.all["index_bottom"].style.height="29";
}
function Hidden()
{
top.document.all["index_top"].style.height="0";
top.document.all["index_main"].style.height="600";
top.document.all["index_bottom"].style.height="0";
}
</script>

index_bottom.htm
bottom
pengxuan 2004-07-02
  • 打赏
  • 举报
回复
<html>

<head>
<title>新建网页 1</title>
<script>
function aa()
{
document.all.iframe1.width=200;
document.all.iframe1.height=300;
}
</script>
</head>

<body>
<iframe href="" name="iframe1"></iframe>
<input type="button" name="B1" value="按钮" onclick="aa()">
</body>

</html>
jk325 2004-07-02
  • 打赏
  • 举报
回复
可我的框是这样分的
<iframe src="/index_top.jsp" trusted="yes" application="no" id="index_top" width="800" height="50" frameborder=0 scrolling=no></iframe>
<iframe src="/index_main.jsp" trusted="yes" application="no" id="index_main" width="800" height="521" frameborder=0 scrolling=no></iframe>
<iframe src="/index_bottom.jsp" trusted="yes" application="no" id="index_bottom" width="800" height="29" frameborder=0 scrolling=no></iframe>
wanghr100 2004-07-02
  • 打赏
  • 举报
回复
demo.htm

<frameset rows="30%,40%,30%" id="baobao">
<frame src="top.htm" name="topFrame">
<frame src="middle.htm" name="middleFrame">
<frame src="bottom.htm" name="bottomFrame">
</frameset>

top.htm
top

middle.htm
<input type=button onclick="window.parent.baobao.rows='0,100%,0'" value="隐藏">
<input type=button onclick="window.parent.baobao.rows='30%,40%,30%'" value="显示">

bottom.htm
bottom

87,921

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧