关于asp强制刷新页面的问题

来源:百度知道 编辑:UC知道 时间:2024/05/22 17:20:41
查到的代码是(存在
../asp/asp_reflash.asp中)
response.AddHeader"pragma","no-cache"
response.AddHeader"cache-control","no-store"
response.AddHeader"expires","-1"
%>
但是这样的话返回原页面时候 session的值也都清空了 怎么既保留sessiond的值 又刷新页面
源代码太多 粘一部分

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../asp/asp_reflash.asp"-->
<html>
<head>
<title>无标题文档</title>
</head>
<body>

<%
'验证身份,并且给于不同权限
'连接数据库
sqladmin="select a.admin_gongzi,a.admin_zuanye,a.admin_zhanghao,a.admin_mima,a.admin_quanxian,teach.teach_name from admin as a,teach where admin_gongzi=teach_gongzi"
opentypeadmin="1"
%>
<!--#include file="../asp/asp_linkadmin.asp" -->'连接数据库的 用到了 sqladmin和opentypeadmin
<%'比较帐号与密码,返回session值
do

试下JAVASCRIPT脚本
window.location.reload();

刷新页面的意义何在?

刷新后还是原来的,有必要刷新吗?我觉得这是你写程序时的逻辑错误。
如果是想定时刷新当前页面,可以这样:
<script language="javascript">
setTimeOut(1000,"location='thisurl.asp';","javascript");
</script>