Javascript JS window.location.href和跨源策略
正如我所知,当域a.com的iFrame试图在域b.com上获取或设置Javascript JS window.location.href和跨源策略,javascript,same-origin-policy,Javascript,Same Origin Policy,正如我所知,当域a.com的iFrame试图在域b.com上获取或设置top.location.href时,它会破坏同一来源策略并抛出“拒绝访问”错误 什么会导致这样的行为不起作用??在我们的测试应用程序中,iframe从www.test-a.com成功地将www.test-b.com上的top.location.href设置为other-site.com时,我感到非常惊讶 这个问题特别是关于使用top.location.href='other site.com'而不是top.location=
top.location.href
时,它会破坏同一来源策略并抛出“拒绝访问”错误
什么会导致这样的行为不起作用??在我们的测试应用程序中,iframe从www.test-a.com成功地将www.test-b.com上的top.location.href
设置为other-site.com时,我感到非常惊讶
这个问题特别是关于使用top.location.href='other site.com'
而不是top.location='other site.com'