【发布时间】:2013-10-15 10:14:51
【问题描述】:
我希望iframe 中的相对链接相对于地址栏中的 URL,而不是相对于 iframe 的 URL。这可能吗?
我只需要现代浏览器支持。
例如:
浏览器地址栏显示http://www.example.com/a/b.html。该网页内部是一个iframe,其中src 是http://othersite.com/12x982h/index.html。在该 html 中,有一个指向 test.html 的链接。当您单击该链接时,浏览器应在http://www.example.com/a/test.html 加载一个新页面。
更新:我无法控制iframe 的内容。
【问题讨论】:
标签: html iframe hyperlink relative-path