简体   繁体   English

是否可以在iFrame中使用JavaScript获取iFrame父页面的引荐来源?

[英]Is it possible to get the referrer of an iFrame's parent page with JavaScript in iFrame?

Is it possible to get the referrer of an iFrame's parent page with JavaScript in iFrame? 是否可以在iFrame中使用JavaScript获取iFrame父页面的引荐来源?

Example: Page A has an iFrame. 示例:页面A具有iFrame。 The iFrames referrer is be page A. But is is possible to get Page A's referrer in the iFrame with JavaScript? iFrames引用者是第A页。但是可以使用JavaScript在iFrame中获取Page A的引用者吗?

This should be: 这应该是:

parent.document.referrer

Anything in the window that creates the iframe should be accessible through the parent scope. 窗口中创建iframe的任何内容都应该可以通过父作用域访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM