新手提问框架的问题 http://msdn2.microsoft.com/en-us/library/ms532998.aspx 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 leftFrame中 <SCRIPT LANGUAGE="JavaScript"> <!-- parent.frames["rightFrame"].document.body.innerHTML = '<table><tr><td>sdfsafaf</td></tr></table>'; //--> </SCRIPT> 右边页面我写了一个画table的函数show(value)其中value就是子节点的值,我能不能在左边页面点击树节点的时候调用右边页面的函数show()呢?请问怎么调用 <html xmlns="http://www.w3.org/1999/xhtml" ><head id="Head1" runat="server"> <title>aaa</title> </head><body ><table style="width: 528px; height: 510px"> <tr> <td style="width: auto; height: auto" valign="top"> <iframe id="LeftFrame" name="LeftFrame" src="Default.aspx" style="height: 500px;width:277px; border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none;" > </iframe> </td> <td style="width: auto; height:auto" valign="top"> <iframe id="RightFrame" name="RightFrame" style="height: 500px; width:777px;border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none;" src="HTMLPage.htm"> </iframe> </td> </tr> </table></body></html>这是我的那个页面像window.frames['frameName'].show()这段代码的话是写在什么地方? window.frames['frameName'].show()该语句在使用 frameset 时,不同框架页的内容时有效parent.show()该语句在 iframe 的页面调用父级页勉的内容时有效var win = window.open('url','iframeName','');win.show()该语句在调用当前页所包含的 iframe 中的内容,且 iframe 中的内容读取完毕时有效 根据上述内容使用两个 iframe ,且 iframe 调用彼此的数据方法不太可行如果用 当前页定义两个变量为 window.open ,或者可行,但没测试这样应该是通过当前页来中转 iframe 的函数比如a.html<iframe name=a1></iframe><iframe name=a2></iframe><script>var a1 = false;var a2 = false;var w1 = window.open('xxx.html','a1','');var w2 = window.open('yyy.html','a2','');function showA2(){ if (a2){ w2.show(); }else{ alert('loading...'); }}</script>xxx.html<a href=javascript:parent.showA2()>click here</a><script>parent.a1 = true;</script>yyy.html<script>parent.a2 = true;function show(){ alert('great!');}</script> 求好的javascript menu的库和例子,谢谢。 求助,firebug提示js错误,freebook is not defined什么意思 关于2个select联动的问题 如何创建一个dom对象 js则么到底分号前的数据 怎样让跳转菜单在新窗口中打开? 不用弹出窗口的办法怎么将工具栏、地址栏去掉? 能介绍一本JAVASCRIPT的入门书吗?谢谢 网管之烦恼 估计还没有人问过这样的问题吧,那是因为不好描述!挺难的!100分! 请问dropdownlist是不是只可以在asp中使用啊? 高分求:判断数字尾数是否为3,4的正则表达式
<SCRIPT LANGUAGE="JavaScript">
<!--
parent.frames["rightFrame"].document.body.innerHTML = '<table><tr><td>sdfsafaf</td></tr></table>';
//-->
</SCRIPT>
<head id="Head1" runat="server">
<title>aaa</title>
</head><body >
<table style="width: 528px; height: 510px">
<tr>
<td style="width: auto; height: auto" valign="top">
<iframe id="LeftFrame" name="LeftFrame" src="Default.aspx" style="height: 500px;width:277px; border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none;" > </iframe>
</td>
<td style="width: auto; height:auto" valign="top">
<iframe id="RightFrame" name="RightFrame" style="height: 500px; width:777px;border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none;" src="HTMLPage.htm">
</iframe>
</td>
</tr>
</table></body>
</html>
这是我的那个页面
像window.frames['frameName'].show()这段代码的话是写在什么地方?
win.show()该语句在调用当前页所包含的 iframe 中的内容,且 iframe 中的内容读取完毕时有效
<iframe name=a2></iframe><script>
var a1 = false;
var a2 = false;
var w1 = window.open('xxx.html','a1','');
var w2 = window.open('yyy.html','a2','');
function showA2(){
if (a2){
w2.show();
}else{
alert('loading...');
}
}
</script>xxx.html
<a href=javascript:parent.showA2()>click here</a>
<script>
parent.a1 = true;
</script>yyy.html
<script>
parent.a2 = true;
function show(){
alert('great!');
}
</script>