怎样退出框架?可能说得不清,进来详看.

marryi 2003-12-26 12:07:08
我用框架做的后台.当会员用户名SESSION为空时,想一点击跳回主页,让其重新登陆
--------出现的问题是:这样跳出并没有真正的跳回主页,因为主页出现在框架的右边
求救,最简单的方法能把我这个问题解决了!!!
我用的是下面这个
<%
if IsNull(Session("memberId")) or IsEmpty(Session("memberId")) or Session("memberId")="" then
Response.Redirect("/default.asp")
end if%>
...全文
54 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
飞一龙 2003-12-26
  • 打赏
  • 举报
回复
要退出框架 注意_top使用,一定能退出,呵呵
RockyPeng 2003-12-26
  • 打赏
  • 举报
回复
常见的方法是使用客户端函数:加入点击的是一个button激发事件

<input type=button name=btnback onclick=back()>
<script language=vbscript>
window.parent.location.reload("index.asp")
</script>
xiaozihao 2003-12-26
  • 打赏
  • 举报
回复
response.write "<script language=javascript>"&"parent.location.assign(default.asp')"&"</script>"

努力接分!!!
wugw 2003-12-26
  • 打赏
  • 举报
回复
jycjyc很完整了,我没有什么可补充。
  • 打赏
  • 举报
回复
Response.Redirect("/default.asp")
==>>>
Response.write "<script>top.location.href='default.asp';</script>"
mingchuan 2003-12-26
  • 打赏
  • 举报
回复
target=_self 好像是这样的样。。。。不记得了。。。...
Jaron 2003-12-26
  • 打赏
  • 举报
回复
<%
if IsNull(Session("memberId")) or IsEmpty(Session("memberId")) or Session("memberId")="" then
response.write "<script>top.location.herf='/default.asp';</script>"
' Response.Redirect("/default.asp")
end if%>
response.redirect 不能跳出框架。
marryi 2003-12-26
  • 打赏
  • 举报
回复
Response.Write("<script language=""JavaScript"" type=""text/JavaScript"">")
Response.Write("alert(""您还没有登录,或者登录已经超时,请登录!"");")
Response.Write("top.location="""&default.asp&""";")
Response.Write("</script>")

--------这种方法最好,呵呵,曾经用过。
---这么多人告诉我,分不够了。加点,然后结帖

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧