![]() |
#2
yms1232012-03-29 14:44
|
一个网页包含多层,点击标签浏览,第二个标签内含有asp后台添加信息的程序,当后台添加完程序后返回页面总是回第一层标签页,如何能够自动跳转回第二层标签呢?
附件中包含页面的截图,大家看一下就知道了。
只有本站会员才能查看附件,请 登录
多标签页面

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.>
<html xmlns="http://www.>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>后台管理</title>
<%sel=request("sel")%>
<!--标签程序样式==================================================-->
<style>
*{ margin:0; padding:0;}
body { font:12px/19px Arial, Helvetica, sans-serif; color:#666;}
.tab { width:1000px;margin:10px;}
.tab_menu { clear:both;}
.tab_menu li { float:left; text-align:center; cursor:pointer; list-style:none; padding:1px 36px; margin-right:4px; background:#F1F1F1; border:1px solid #898989; border-bottom:none;}
.tab_menu li.hover { background:#DFDFDF;}
.tab_menu li.selected { color:#FFF; background:#6D84B4;}
.tab_box { clear:both; border:1px solid #898989; height:600px;}
.hide{display:none}
</style>
<!-- 变迁程序引入jQuery================================ -->
<script src="js/jquery1.3.2.js" type="text/javascript"></script>
<script type="text/javascript" >
//<![CDATA[
$(function(){
var $div_li =$("div.tab_menu ul li");
$div_li.click(function(){
$(this).addClass("selected") //当前<li>元素高亮
.siblings().removeClass("selected"); //去掉其它同辈<li>元素的高亮
var index = $div_li.index(this); // 获取当前点击的<li>元素 在 全部li元素中的索引。
$("div.tab_box > div") //选取子节点。不选取子节点的话,会引起错误。如果里面还有div
.eq(index).show() //显示 <li>元素对应的<div>元素
.siblings().hide(); //隐藏其它几个同辈的<div>元素
})
})
//]]>
</script>
</head>
<body>
<div class="tab">
<div class="tab_menu">
<ul>
<li class="selected">信息分类添加与管理</li>
<li>信息添加</li>
<li>信息管理</li>
</ul>
</div>
<div class="tab_box">
<div class="hide"></div>
<div class="hide">
<!--#include file="news_fenlei_2.asp"-->
</div>
<div class="hide">娱乐</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.>
<html xmlns="http://www.>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>后台管理</title>
<%sel=request("sel")%>
<!--标签程序样式==================================================-->
<style>
*{ margin:0; padding:0;}
body { font:12px/19px Arial, Helvetica, sans-serif; color:#666;}
.tab { width:1000px;margin:10px;}
.tab_menu { clear:both;}
.tab_menu li { float:left; text-align:center; cursor:pointer; list-style:none; padding:1px 36px; margin-right:4px; background:#F1F1F1; border:1px solid #898989; border-bottom:none;}
.tab_menu li.hover { background:#DFDFDF;}
.tab_menu li.selected { color:#FFF; background:#6D84B4;}
.tab_box { clear:both; border:1px solid #898989; height:600px;}
.hide{display:none}
</style>
<!-- 变迁程序引入jQuery================================ -->
<script src="js/jquery1.3.2.js" type="text/javascript"></script>
<script type="text/javascript" >
//<![CDATA[
$(function(){
var $div_li =$("div.tab_menu ul li");
$div_li.click(function(){
$(this).addClass("selected") //当前<li>元素高亮
.siblings().removeClass("selected"); //去掉其它同辈<li>元素的高亮
var index = $div_li.index(this); // 获取当前点击的<li>元素 在 全部li元素中的索引。
$("div.tab_box > div") //选取子节点。不选取子节点的话,会引起错误。如果里面还有div
.eq(index).show() //显示 <li>元素对应的<div>元素
.siblings().hide(); //隐藏其它几个同辈的<div>元素
})
})
//]]>
</script>
</head>
<body>
<div class="tab">
<div class="tab_menu">
<ul>
<li class="selected">信息分类添加与管理</li>
<li>信息添加</li>
<li>信息管理</li>
</ul>
</div>
<div class="tab_box">
<div class="hide"></div>
<div class="hide">
<!--#include file="news_fenlei_2.asp"-->
</div>
<div class="hide">娱乐</div>
</div>
</div>
</div>
</body>
</html>
包含的程序页面

<!--#include file="conn.asp"-->
<%
dim noo
noo=request("noo")
if noo<>"" then
%>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from news_fenlei "
rs.open sql,conn,1,3
rs.addnew
fenlei1=request("fenlei1")
rs("fenlei")=fenlei1
rs.update
rs.close
response.redirect(request.ServerVariables("HTTP_REFERER"))
response.End()
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.>
<html xmlns="http://www.>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>新闻分类添加</title>
<style type="text/css">
<!--
body {
margin-left: 18px;
}
body,td,th {
font-size: 12px;
}
-->
</style>
<link href="css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form0" name="form0" method="post" action="news_fenlei_2.asp?noo=noo">
<table width="800" border="0" cellspacing="0">
<tr>
<td width="596"> </td>
</tr>
<tr>
<td height="30"> 信息分类添加:
<input name="fenlei1" type="text" />
<input type="submit" name="Submit" value="添加分类" /></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<table width="750" border="0" align="left" cellpadding="4" cellspacing="0">
<%
str2="select * from news_fenlei order by ID DESC"
set rs2=server.CreateObject("adodb.recordset")
rs2.open str2,conn,1,1
if rs2.eof then
response.write "暂时没有链接信息!"
else
Do while NOT rs2.EOF %>
<tr>
<% for i=1 to 5
if not rs2.eof then%>
<td align="center" width="150">
<table width="100%" border="1" style="border-bottom:#CCCCCC; border-bottom-color:#000000" cellpadding="0" cellspacing="0" >
<tr>
<td width="150" align="center" valign="middle" bgcolor="#CCCCCC" height="90">
<form id="form1" name="form1" method="post" action="news_fenlei_xiugai_add.asp?id=<%=rs2("id")%>">
<input name="fenlei" type="text" value="<%=rs2("fenlei")%>" size="10" />
<input type="submit" name="Submit" value="修改" />
<br /><br />
<p><a href="news_fenlei_del.asp?id=<%=rs2("id")%>">直接删除分类</a></p>
</form>
</td>
</tr>
</table>
</td>
<% rs2.movenext
end if
next%>
</tr>
<% loop
end if
rs2.close
set rs2=Nothing
%>
</table>
</form>
</body>
</html>
[ 本帖最后由 baobaoxiaomu 于 2012-3-29 18:50 编辑 ]