iframe传值到父窗口的问题

wygsea 2010-05-11 09:21:52
我有一个父窗口A和一个子窗口B,想通过post和get传值,A和B不是同一个应用下的页面。传值过程中页面不能跳转
A的关键代码如下,将输入的公司代码通过POST传给B:
<IFRAME NAME="frame1" SRC="B.asp"></IFRAME>
<FORM METHOD="POST" ACTION="B.asp" TARGET="frame1">
<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="30" align="center"><p>公司代码:<input type="text" name="co_id" size="20" /></td>
</tr>
<tr>
<td height="30" align="center"><p><input type="submit" value="送信"></p></td>
</tr>
</table>
</form>
B的代码如下,B接收A传的公司代码,获取这个公司的人数,然后通过get把人数传回给A:
<form action='A' method='get' ><table width='600' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td height='30' align='center'><p>公司代码:<input type='text' name='co_id' size='20' /></td>
</tr>
<tr>
<td height='30' align='center'><p>公司人数:<input type='text' name='k_name' size='20' /></td>
</tr> "
<tr>"
<td height='30' align='center'><p><input type='submit' value='送信'></p></td>
</tr>"
</table>
</form>

现在的问题是在A中通过怎样的方式获取B传回来的公司人数,而不需要跳转页面。
需要说明的是,B是另外一个应用,不能修改它的代码,只知道他是通过get的方式
传递参数。(实际上B应该是隐藏的,而且是它自动提交)
...全文
429 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
lj419300010 2011-02-27
  • 打赏
  • 举报
回复
http://www.javaeye.com/topic/340740
wygsea 2010-05-11
  • 打赏
  • 举报
回复
高手都进来看看哟
qq373591361 2010-05-11
  • 打赏
  • 举报
回复
帮顶。。。。。。
jinglingxiaoxiao 2010-05-11
  • 打赏
  • 举报
回复
看不太懂。。。。
wwq0123 2010-05-11
  • 打赏
  • 举报
回复
wygsea 2010-05-11
  • 打赏
  • 举报
回复
自己解决了<form action='A' method='get' targer='_parent'>就行了

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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