来自iframe的top.location与src ssl [英] top.location from iframe with src ssl

查看:58
本文介绍了来自iframe的top.location与src ssl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

如果当前位置是有办法获取window.top.location。 ..? target =_ blank> https:// ...?

parent.html将使用src =" https://www.testtest调用if iframe。 com / sun.html"


sun.html

应该提醒打开它的网址。


没有https它的工作。


有办法吗?


谢谢

hello all.

is there a way to get the window.top.location if the current location is https://...?

parent.html will call am iframe with src="https://www.testtest.com/sun.html"

sun.html
should alert the url that opened it.

without the https its working.

is there a way?

thanks

推荐答案

它来自同一个域吗?


不,它不是

父母可以 http://www.google.com

iframe可以 https://www.aol.com


通常情况下,http也不允许跨域。你在本地测试吗?
Normally, http wouldn''t be allowed cross-domain either. Are you testing locally?


这篇关于来自iframe的top.location与src ssl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆