Javascript 如何从iFrame内部重定向?
我使用网站重定向页面Javascript 如何从iFrame内部重定向?,javascript,iframe,url-redirection,location-href,Javascript,Iframe,Url Redirection,Location Href,我使用网站重定向页面window.location.href,它在iframe流量上的所有流量上都可以正常工作 <script type="text/javascript"> window.location.href="http://newUrlLocation.com"; </script> 请任何人帮助我,我想对我的所有流量使用top.location.href,对iframe使用:window.top.location.href
window.location.href
,它在iframe
流量上的所有流量上都可以正常工作
<script type="text/javascript">
window.location.href="http://newUrlLocation.com";
</script>
请任何人帮助我,我想对我的所有流量使用
top.location.href
,对iframe
使用:window.top.location.href
而不是:top.location.href
两者之间的区别:使用:
window.top.location.href
而不是:top.location.href
两者之间的区别:可能重复:可能重复的可能重复:jquery.js:9729未捕获DomeException可能重复:阻止原点为“”的帧访问交叉原点帧。jquery.js:9729未捕获DomeException:阻止原点为“”的帧访问交叉原点帧。
<script type="text/javascript">
top.location.href="http://newUrlLocation.com";
</script>