即使脚本在_blank窗口中运行,我们也可以在原始窗口上触发脚本吗

问题描述:

这是设置:

在Paypal上单击按钮(在_blank中打开),我的焦点窗口变为Paypal,可以在原始窗口中运行脚本.

On Paypal click button (openned in _blank) My focus window becomes Paypal, is it possible to run a script in original window.

现在我的脚本是((如果目标位于原始页面的iframe中,效果很好),但是Paypal不允许,这就是我遇到的问题的原因)

Right now my script is (and it works well if target is within iframe of original page - but Paypal does do not allow it, that's why I have the issue):

  $click = '<script type="text/javascript">window.top.parent.parent.submitsubmit();</script>';
  echo $click;

只是想知道我想做的事是否现实,

Just wondering if what I want to do is realistic,

预先感谢

可以对已在_blank中打开的窗口进行脚本编写.但是,如果打开的URL具有不同的(子)域,则无法访问内容.

Scripting towards a window that has been opened in a _blank is possible. However accessing the contents is not possible when the opened url is of a different (sub)domain.