-1

我只需要知道谁在构建我的网站?我只想知道网址。有没有办法找出来?

  • 我不想打破框架,我只想知道谁在框架。

谢谢。

4

1 回答 1

2

this answer中所述,您可以通过执行获取“父”URL

var url = (window.location != window.parent.location) ?
    document.referrer: document.location;

然后,您可以(例如)将此 URL 记录为 Google Analytics 事件:

_gaq.push(['_trackEvent',
    'framed',
    location.pathname + location.search, // the URL of the iframe (your page)
    url, // the URL of the hosting page
    0,
    true]);
于 2013-06-07T15:05:04.387 回答