本帖最后由 Green_leaves 于 2012-6-15 15:40 编辑
求助各位!非常的急!网页设计课期末作业写一个asp程序,我写的是一个博客程序,后台功能实现的时候出了点问题。具体如下:
首先我说下我后台的构架
XVR_THAMH1RY$~9@_}`%[email protected]
这个是实际的图
Z(3B_42V$BC9FW097MLY~_5.jpg
这个是代码
<%
if session("username")<>"" then
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2321" />
<title>后台管理</title>
</head>
<frameset cols="*" rows="136, *" id="frame_main" border="0">
<frame src="header.asp" noresize="noresize" name="header">
<frameset cols="240, *">
<frame src="menu.asp" name="menu" />
<frame src="main.asp" name="main" />
</frameset>
</frameset>
<noframes><body>
</body>
</noframes></html>
<%
else
response.write("<script language='javascript'>alert('你的登陆已过期,请重新登陆!');location.href='login.asp';</script>")
end if
%>
我想实现的功能是点击退出管理后跳转到登陆页面,因为退出管理的代码在header.asp中
<div id="welcome">欢迎你回来,Admin! <img src="images/clock.gif" /> 现在时间: <%=now()%></div>
<div id="adminop">
<ul>
<li><a href="#">管理首页</a></li>
<li><a href="loginout.asp">退出管理</a></li>
<li><a href="#">站点首页</a></li>
</ul>
我点击退出管理调用loginout.asp文件
<%
if session("username")<>"" then
session.abandon()
end if
response.write("<script language='javascript'>alert('注销成功');location.href='login.asp'</script>")
%>
但是这样的话,注销后跳转,只是header.asp这个文件跳转到了登陆页面,如图
LR0BE5B)(U@R(LU2~I66%1Y.jpg
求解决办法!使点击退出管理直接整个页面跳转! 弄好了我给你加金币!呵呵呵!