热门
最新
红包
立Flag
投票
同城
我的
发布
弹弹霹雳
6 年前
trueweixin_48029654
有学Java的互关吗?平常有问题可以互相探讨呀,一个人自学怕走歪
下一条:
使用 location.hash 实现跨域 与 window.name 跨域的情况相同,是不同域的页面间的参数传递,需要借助 iframe 标签,A 页面和 B 页面是同域的http://localhost:3000, C 页面是独立的域 http://localhost:4000。A 页面通过 iframe 引入 C 页面,并给 C 页面传一个 hash 值, C 页面收到 hash 值后创建 iframe 引入 B 页面,把 hash 值传给 B 页面, B 页面将自己的 hash 值放在 A 页面的 hash 值中,访问http://localhost:3000/a.html。
立即登录