Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Iframe 窗口来显示另一个网站的登录表单。我想要的是用户在登录后应该去那个特定的站点(即使登录失败,任何点击该 iframe 中的任何链接都应该将用户带到整个窗口(父窗口)中的那个站点。
只要链接(在 iFrame 内)是其他页面的一部分,您就不能“劫持”它们的target. 您必须具有修改target每个链接的属性以指向_parent或使用 javascript 来引用window.parent.
target
_parent
window.parent
根据您所说的(您登录到不同的域并且该页面不是您网站的一部分),如果不实施某种代理,您可以在页面访问之间修改内容,这是不可能的。