不同的两个frame间的调用 请各位大侠帮忙解决下:我的main.html里包含了几个frame页面(leftFrame,topFrame,middelFrame...),现在我想通过点击left.html里的菜单在top.thml里显示该菜单的下一级菜单,改怎么操作啊,等着,急!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 left 里面:<a href="menu1_sub.html" target="topFrame">菜单一</a>top frame:<iframe name="topFrame" ...........></iframe> 你知道两个方法就行了iframe里的页面调用父窗口的程序:parent.函数名();parent.变量名父窗口调用子窗口的程序:document.frames['框架名'].函数名();document.frames['框架名'].变量名;所以你需要的A框架调用B框架的程序写法比较复杂点parent.document.frames['框架B'].函数名() 那个<iframe...>我不知道该放到哪里去啊 所以你需要的A框架调用B框架的程序写法比较复杂点parent.document.frames['框架B'].函数名()[/Quote]能举个例子吗 topFrame应该包含在你的main.html里面楼主,你自己不都写出来了吗? 举例父窗口代码:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>新建网页 1</title></head><body><p><iframe name="I1" src="new_page_2.htm">浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe><iframe name="I2" src="new_page_3.htm">浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe></p></body></html>I1里的代码:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>新建网页 2</title></head><body><script language=javascript>function alertA(){alert('a');}</script></body></html>I2里的代码:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>新建网页 3</title></head><body><p><input type="button" value="按钮" name="B3" onclick="parent.document.frames['I1'].alertA();"></p></body></html>运行父窗口,点击按钮即可执行I1的代码 怎么我调用出来的是整个menu_sub.html页面,我要的只是局部刷新啊 就是说,我只想要topFram里的一个table刷新,而不是整个topFram刷新 在父窗口 中开辟一个全局变量window.allF={};window.allF.abc=function(){};任何地方都能调用window.allF.abc() 这是mail.html文件<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>信息管理系统</title></head><frameset rows="98,*,8" frameborder="no" border="0" framespacing="0"> <frame src="top.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" /> <frame src="center.html" name="mainFrame" id="mainFrame" /> <frame src="down.html" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" /></frameset><noframes><body></body></noframes></html> 抓取网页源代码遇到的难题! 为什么不能实现侧边栏和主体内容跳转啊 求大侠指导一下 求助 关于网站项目 问题 有关正则表达式的问题 一个对象。内有方法。方法内又有某元素的方法。请问该元素的对象如何调用该对象的方法? js 左右文字移动 请大家帮忙看看我这段程序哪错了~~ 浏览器中如何获取分辨率,并改变镶嵌在其中的flash尺寸? 我的javascript程序生成了许多的文本框,id是:file1,file2,.....现在我想用for语句遍历这些文本框,怎么实现? 求一个利用javabean+java开发的jsp网站 Javascript: 整形数组转换为字符串问题
<a href="menu1_sub.html" target="topFrame">菜单一</a>
top frame:
<iframe name="topFrame" ...........></iframe>
iframe里的页面调用父窗口的程序:
parent.函数名();
parent.变量名父窗口调用子窗口的程序:
document.frames['框架名'].函数名();
document.frames['框架名'].变量名;所以你需要的A框架调用B框架的程序写法比较复杂点
parent.document.frames['框架B'].函数名()
那个<iframe...>我不知道该放到哪里去啊
parent.document.frames['框架B'].函数名()
[/Quote]能举个例子吗
楼主,你自己不都写出来了吗?
父窗口代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<p><iframe name="I1" src="new_page_2.htm">浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe>
<iframe name="I2" src="new_page_3.htm">浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe></p>
</body>
</html>
I1里的代码:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 2</title>
</head><body>
<script language=javascript>
function alertA(){
alert('a');
}
</script>
</body></html>I2里的代码:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 3</title>
</head><body><p><input type="button" value="按钮" name="B3" onclick="parent.document.frames['I1'].alertA();"></p></body></html>
运行父窗口,点击按钮即可执行I1的代码
这是mail.html文件<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>信息管理系统</title>
</head><frameset rows="98,*,8" frameborder="no" border="0" framespacing="0">
<frame src="top.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" />
<frame src="center.html" name="mainFrame" id="mainFrame" />
<frame src="down.html" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" />
</frameset>
<noframes><body>
</body>
</noframes></html>