Returns a reference to the window that opened this current window.
When a window is opened from another window (using Window.open), it maintains a reference to that first window as window.opener. If the current window has no opener, this method returns NULL.
document.referrer
referrer 属性可返回载入当前文档的文档的 URL。
只有当用户在上一个页面点击链接到达当前页面,document.referrer才会有值当用户输入这一页的网址、通过response.redirect、用了ssl这些情况referrer都会为空。 另外,其必须通过http协议使用。否则不能得到返回值,即值为空。
window.opener
Returns a reference to the window that opened this current window.
When a window is opened from another window (using Window.open), it maintains a reference to that first window as window.opener. If the current window has no opener, this method returns NULL.