如何禁用 window.opener

1. 什么是 window.opener window.opener 表示打开当前窗体页面的的父窗体是谁。 例如,在 A 页面中,通过一个带有 target="_blank" 的 a 标签打开了一个新的页面 B,那么在 B 页面里,window.opener 的值为 A 页面的 window 对象。 无来源的打开的页面,或者被禁止了 opener 的页面创建/打开,opener 的值为 null。
相关文章
相关标签/搜索