获取 iframe 中的parentWindow值
我有两个 Java 网络应用程序运行不同的 JBOSS 服务器。
像
- App1 - http:\10.20.34.55:8080\SpringApp1
- App2 - http:\10.20.34.55:8089\SpringApp2
我在 App1 中使用 iFrame 来获取 App2 UI 详细信息。
<iframe src="http:\\10.20.34.55:8089\SpringApp2" ></iframe>
我可以在 App1 中获取 App2 应用程序。当我在 App2 中对 App1 进行一些更改时,它表现良好。
App1 - Parent Window
App2 - Child Window
请帮助我,当我在 App2 子窗口中执行某些操作时,我必须自动提交 App1。
我正在使用这段代码,但没有用。
parent.document.getElementById("App1Submit").click();
App1Submit - App1 提交按钮。
I am having two web applicaion in java running different JBOSS Server.
Like
- App1 - http:\10.20.34.55:8080\SpringApp1
- App2 - http:\10.20.34.55:8089\SpringApp2
I am using iFrame in App1 to get the App2 UI details.
<iframe src="http:\\10.20.34.55:8089\SpringApp2" ></iframe>
I am able get the App2 application in App1. When I do some changes in App2 with in App1 it's perfoming well.
App1 - Parent Window
App2 - Child Window
Please help me when I am doing some operation in App2-child window, I have to autosubmit App1.
I am using this code but no use.
parent.document.getElementById("App1Submit").click();
App1Submit - App1 submit button.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
又一个跨域 iframe 调整大小问答
我对如何通过 iframe 进行通信进行了广泛的研究,即跨域 -但它提供了多种方法和解释。
您应该考虑首先在论坛中搜索相关答案或问题。
我还强烈建议使用和学习一些 jQuery 来增强您管理 HTML 的体验。 jQuery 为您完成了所有艰苦的工作,并且非常灵活。
Yet Another cross-domain iframe resize Q&A
I did extensive research into how to communicate via iframes, that is cross domain- but it offers a variety of methods and explanations.
You should consider searching the forum first for relevant answers or questions.
I would also strongly recommend using and learning a bit of jQuery to enhance your experience in managing HTML. jQuery does all the hard work for you and is very flexible.