FrameA:alert(parent.FrameB.b)
FrameB:alert(parent.FrameA.document.all.a.value)
FrameB:alert(parent.FrameA.document.all.a.value)
解决方案 »
- Json数据去掉重复的数据
- 换行问题
- [真诚求助]请高手对这个replace()的正则表达式进行祥细解释!
- 如何在<div>中的元素对齐
- 为何我的对联广告点击关闭后页面中其他的GIF动画都不播放了?
- 用javascript,子窗口怎样把数据填充到父窗口的textbox中
- 如何实现从客户端向服务器端的参数传递?
- 如何实现在程序运行时加减代码?
- javascript有没有像vbscript的isdate()函数?
- 快捷键绑定FORM表单按钮提交事件,失效问题,请教各位
- 弹出收件人窗口,选择后怎样把信息返回原窗口?谢谢指引!!(OA)
- 求助:怎样在JS中获得MS Media Player的错误代码?如播放文件不存的errorcode?
fason大哥看看:
Untitled-4.htm:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<iframe id="inframe" src="Untitled-5.htm"></iframe>
<script>
alert(document.frames[0].document.all("txt").value);
</script>
</body>
</html>Untitled-5.htm:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<form name="form1" method="post" action="">
<input type="text" id="txt" name="textfield" value="aa">
</form>
</body>
</html>
function window.onload(){
alert(document.frames[0].document.all("txt").value);
//alert(document.frames[0].document.form1.txt.value);
}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<iframe id="inframe" src="Untitled-5.htm"></iframe>
<script>
alert(inframe.document.form1.textfield.value);
</script>
</body>
</html>Untitled-5.htm:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<form name="form1" method="post" action="">
<input type="text" id="txt" name="textfield" value="aa">
</form>
</body>
</html>
不知道你有没有试过呢?
我试过是不行的。to fason(【阿信】):
你的方法行,但是能不能解释一下为什么我的方法和zhjzh_zjz(虚心学习,望多指教)的方法都不行呢,谢谢指教!