直接跳转是使用<a>设置路径再加个target属性,我现在在后台里想跳不知道该怎么写了。
解决方案 »
- dhtmlxTree中文乱码问题。
- html 选中select 值传入文本框(显示值 和value)传入两个文本框
- 下面这段代码中document.zcform.username.select();是什么意思
- 我这短网页右侧漂浮广告代码为什么运行后ie下面显示已完毕,但网页上有错误?
- 关于hta(HTML Application)
- JS 好的提示工具?
- 求教onmouseover事件
- confirm弹出的框中是取消和确定按钮,请问能否该成是与否的按钮
- 这段程序什么意思啊~~~~~~~~~~
- 请问VBSCRIPT和JAVASCRIPT怎么共用变量
- 关于JS RegExp 正则的Replace的问题,在线等,当场给分
- 终于问个难点的了
我一个框架a.htm中分两部分,top和main。
在top中有一个a它的href=B.htm(另一个框架),target为main。当点击的时候就可以将main中内容跳到B.htm中设置的框架中了。
我现在要做的是:
在跳转中加了一个页面login.aspx;也就是top中的a的href=login.aspx;
在login跳转页面的时候我想使其再转为B.htm。在后台该怎么写?
out.println("<script language=\"javascript\">";
out.println("document.frames['frm1'].location.href='test1.html';";
out.println("</script>";
<html>
<head>
<TITLE>主页</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</head>
<frameset rows="100,*" frameborder="no" border="0" framespacing="0">
<frame src="Top.aspx" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" />
<frame src="NewsList.aspx" name="mainFrame" id="mainFrame"/>
</frameset>
<noframes />
</html>框架B:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>无标题页</title>
</head>
<body>
<frameset rows="*" framespacing="1" frameborder="no" border="1" bordercolor="#D4D0C8">
<frameset cols="213,*" framespacing="1" frameborder="no" border="1" bordercolor="#D4D0C8">
<frame name="contents" src="Contents.aspx">
<frame name="main" src="TypeContrl.aspx">
<noframes>
</noframes>
</frameset>
</frameset>
</body>
</html>
top.aspx中有一个标签<a href="Login.aspx" target="mainFrame">
然后在Login中有个后台事件btn(),我要在这个事件中做到将mainFrame变为B;
我就只是在常做的中间加了一个login页!
不报js错,也不跳转。
Response.Redirect("HTMLPage.htm");
我执行跳转的页面才是个aspx文件!
<input type="button" value="提交" onClick="btn()">
<script language="javascript">
function btn(){
window.parent.location="b.htm";
}
</script>
//b.htm表示你想在mainFrame中打开的页面.
这段js对吧!