【发布时间】:2014-09-23 01:40:49
【问题描述】:
我有两个网站 www.mywebsite.com 和 www.otherwebsite.com。我使用 iframe 将 mywebsite.com 重定向到 otherwebsite.com。是否有在页面更改时更改 url 的路径。例如,当单击链接 otherwebsite.com/contact.html 时,框架会将 /contact.html 添加到 mywebsite.com,使其成为 www.mywebsite.com/contact.html。我尝试将下面的代码添加到页面中,但它似乎不适用于框架。
history.pushState(null, "A new title!", "contact.html")
【问题讨论】:
标签: javascript jquery url iframe