Javascript 将URL信息从父iframe转发到子iframe
我需要想出一种方法,将阻止信息从我们学校的互联网过滤器转发到我们学校的内部网络服务器。最后一个页面将只是一个普通的html页面,但中心有一个iframe,允许教员登录以覆盖internet过滤器 当过滤器第一次阻止页面时,它将用户发送到Javascript 将URL信息从父iframe转发到子iframe,javascript,html,url,redirect,iframe,Javascript,Html,Url,Redirect,Iframe,我需要想出一种方法,将阻止信息从我们学校的互联网过滤器转发到我们学校的内部网络服务器。最后一个页面将只是一个普通的html页面,但中心有一个iframe,允许教员登录以覆盖internet过滤器 当过滤器第一次阻止页面时,它将用户发送到 http://extranet.test.org/blocked.html?URL=http://test.8e6.net/&IP=4.4.4.4&CAT=GPORN&USER=IPGROUP之后的所有内容都在哪里?是iframe在其URL末尾必须包含的信息 在
http://extranet.test.org/blocked.html?URL=http://test.8e6.net/&IP=4.4.4.4&CAT=GPORN&USER=IPGROUP
之后的所有内容都在哪里?是iframe在其URL末尾必须包含的信息
在父页面的html中,如何指定iframe应转到
http://google.com/block.html
在父页面的?
之后添加内容?因此,iframe最终应该是http://google.com/block.html?URL=http://test.8e6.net/&IP=4.4.4.4&CAT=GPORN&USER=IPGROUP
换句话说,您需要使用JavaScript创建一个iframe,其中包含来自父页面的查询字符串
奇怪的是,在JavaScript中,查询字符串位于window.location.search
,其中包含?
字符。这意味着您可以使用以下代码将其复制到iframe中:
<iframe id="bypass-login"/>
<script>
loginIframe = document.getElementById("bypass-login");
loginIframe.src="http://google.com/block.html" + window.location.search;
</script>
loginIframe=document.getElementById(“绕过登录”);
loginIframe.src=”http://google.com/block.html“+window.location.search;
您很可能弄错了,&
后面的部分属于第一个url,而不是第二个。。&IP=4.4.4.4&CAT=GPORN&USER=IPGROUP