html文件中 frame跳转的问题
大家好,有个问题向大家请教!
在一个html窗体(main.htm)中,有三个frame
<frameset framespacing="0" border="0" frameborder="0" rows="116,*,2%">
<frame name="top" scrolling="no" noresize target="middle" src="../pub/top.aspx">
<frame name="middle" target="bottom" src="../middle.htm"
scrolling="auto" noresize>
<frame name="bottom" scrolling="no" src="../pub/boot.htm"
noresize>
<noframes>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"
onmouseover="parent.status='HQS';return true" >
<p>此网页使用了框架,但您的浏览器不支持框架。</p>
</body>
</noframes>
</frameset>
现在,我想通过接收接收传递过来的参数,根据不同的参数值,指定middle这个frame的不同的src值,
如:main.htm?Aim=aaaa ,我想将middle的src设置为:aaaa.aspx
不知道如何写,请大家指教!
我的javascript是这样写的
<script language=javascript >
enterDiffAim();
function enterDiffAim() //进入页面后,根据传递进来的参数,进入 相应子页面
{
var url=window.location .href;
var aa=url.indexOf('=');
if (aa == -1)
return "";
url=url.substring(aa+1);
if (url == "aaaa")
{
//这里不知道如何写了,
parent.document.frames("middle").document.location.href="../pub/aaaa.aspx"; //这样写不行
}
}
</script>
在一个html窗体(main.htm)中,有三个frame
<frameset framespacing="0" border="0" frameborder="0" rows="116,*,2%">
<frame name="top" scrolling="no" noresize target="middle" src="../pub/top.aspx">
<frame name="middle" target="bottom" src="../middle.htm"
scrolling="auto" noresize>
<frame name="bottom" scrolling="no" src="../pub/boot.htm"
noresize>
<noframes>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"
onmouseover="parent.status='HQS';return true" >
<p>此网页使用了框架,但您的浏览器不支持框架。</p>
</body>
</noframes>
</frameset>
现在,我想通过接收接收传递过来的参数,根据不同的参数值,指定middle这个frame的不同的src值,
如:main.htm?Aim=aaaa ,我想将middle的src设置为:aaaa.aspx
不知道如何写,请大家指教!
我的javascript是这样写的
<script language=javascript >
enterDiffAim();
function enterDiffAim() //进入页面后,根据传递进来的参数,进入 相应子页面
{
var url=window.location .href;
var aa=url.indexOf('=');
if (aa == -1)
return "";
url=url.substring(aa+1);
if (url == "aaaa")
{
//这里不知道如何写了,
parent.document.frames("middle").document.location.href="../pub/aaaa.aspx"; //这样写不行
}
}
</script>
...全文
相关推荐
modulo2.md
gee 训练教程——基于GEE javascript API 西班牙语教程
rocketseat-starter-js-modulo2
rocketseat-starter-js-modulo2
webcalc-modulo-java:webcalc-modulo-java
webcalc-modulo-java:webcalc-modulo-java
modulo-3-evaluacion-final-eugedallasta:modulo-3-evaluacion-final-eugedallasta,由GitHub Classroom创建
modulo-3-evaluacion-final-eugedallasta:modulo-3-evaluacion-final-eugedallasta,由GitHub Classroom创建
modulo-2-evaluacion-final-marina-fp:modulo-2-evaluacion-final-marina-fp,由GitHub Classroom创建
最终评估奖2:JavaScript的Adalab


