java script中如何访问其他窗口的变量那? java script中如何访问其他窗口的变量那? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 页面自己打开的窗口可以访问parent top等 和调用函数类似<html><head><script type="text/javascript">var parentstr="parent String"function callChild(){ alert(myFrame.window.childstr);}</script></head><body><input type=button value="调用child.html中的变量" onclick="callChild()"><iframe name="myFrame" src="child.html"></iframe></body></html><html><head><script type="text/javascript">var childstr="child String";function callParent() { alert(parent.parentstr); }</script></head><body><input type=button value="调用parent.html中的变量" onclick=callParent()></body></html> 现在页面之间的通信都是交给flash来做的...不只是支持二个页面,甚至二个不同浏览器打开的页面都能交换数据,调用函数, 你找下 flash的,LocalConnection类就行了 JS如何实现打开文件选择框 大哥们。。帮我一下。只能发这一个了。。 谁能帮我找出错误(菜鸟问题) 怎么看自己的技术水平啊 用js如何向一个table里加数据? ext多选框问题 JS中有什么方法可以去掉IE的标准按钮栏和地址栏 请问高手:在网页上能否实现像资源管理器一样多级菜单的自由增加级别和增加项? 用正则表达式怎样匹配正反斜杠?? 怎么判断一个变量的内容是不是为空?(null) 书上例子 列表框重新排序之疑问:insertBefore() flash鼠标滚动放大缩小
parent top等
<html>
<head>
<script type="text/javascript">var parentstr="parent String"function callChild()
{ alert(myFrame.window.childstr);
}
</script>
</head><body>
<input type=button value="调用child.html中的变量" onclick="callChild()">
<iframe name="myFrame" src="child.html"></iframe>
</body>
</html><html>
<head>
<script type="text/javascript">
var childstr="child String";
function callParent() {
alert(parent.parentstr);
}
</script>
</head>
<body>
<input type=button value="调用parent.html中的变量" onclick=callParent()>
</body>
</html>