试验场景:
a.html 在域 www.a.com下
b.html 在域 www.b.com 下
a中通过iframe 引用 b.html
期望结果:
在b.html相关处理完成后 修改 a.html中的元素 <input id="crossDomainInput" type="text" />
应用场景:
公司内部有两个系统,一个电商系统,一个第三方支付系统, PC端需要在支付时跳转至第三方系统登录、支付,支付完成返回电商系统
解决案例:
1:在域www.a.com 下新建一个页面取名为c.html
c.html案例
<html>
<head>
<title>c.html</title>
</head>
<script type="text/javascript">
parent.parent.document.getElement