JS 页面刷新数据

javascript:history.go(-3) 我用这个语句返回三步到我的一个页面,但在返回去后如何直接刷新页面数据呢?返回去时显示的数据还是旧的记录。

我的代码:
sub SaveSuccess()
dim strErr
strErr=strErr & "<html><head><title>提交的信息已保存</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbcrlf
strErr=strErr & "<table cellpadding=2 cellspacing=1 border=0 width=400 class='border' align=center>" & vbcrlf
strErr=strErr & " <tr align='center' class='news1'><td height='22'>提交的信息已保存</td></tr>" & vbcrlf
strErr=strErr & " <tr align='center' class='tdbg'><td><a href='admin_articleadd.asp'><< 继续添加</a></td></tr>" & vbcrlf
strErr=strErr & "</table>" & vbcrlf
strErr=strErr & "</body></html>" & vbcrlf
response.write strErr
end sub

应该怎么弄,求高手帮忙解答下.

Javascript刷新页面的几种方法:
1 history.go(0)
2 location.reload()
3 location=location
4 location.assign(location)
5 document.execCommand(‘Refresh‘)
6 window.navigate(location)
7 location.replace(location)
8 document.URL=location.href.
____________________________________________
框架页中:(框架页中其中一个子页)
top.location.reload(); 刷新整页
self.location.reload(); 刷新本页
window.parent.location.href='' 框架页重定向
_____________________________________________
自动刷新页面的方法:1.页面自动刷新:把如下代码加入<head>区域中<meta http-equiv="refresh" content="20">其中20指每隔20秒刷新一次页面.<body onload="opener.location.reload()"> 开窗时刷新<body onUnload="opener.location.reload()"> 关闭时刷新。
例:数据添加成功后弹出对话框并刷新页面
if (infoAction_Sort.Insert(info_Sort))
{
ScriptManager.RegisterStartupScript(this.UpdatePanel, this.GetType(), "alert", "alert('相册分类添加成功');window.location.reload();", true);

//Alert("相册分类创建成功");
//Response.Redirect(Request.Url.ToString());//刷新本页
this.txt_AddSort.Text = "";
this.txt_SortDepict.Text = "";
}
温馨提示:答案为网友推荐,仅供参考
第1个回答  2018-03-12
我们每请求一个页面,浏览器都会将它保存在本地
就这样保存了一个又一个。
javascript:history.go(-3) 的意思是,返回前3个去,
浏览器会把那个文件直接显示给你,而不是发一个请求,也不执行什么
所以这是不行的,建议你把javascript:history.go(-3)换成跳转.本回答被网友采纳
第2个回答  2010-05-28
我们每请求一个页面,浏览器都会将它保存在本地
就这样保存了一个又一个。
javascript:history.go(-3) 的意思是,返回前3个去,
浏览器会把那个文件直接显示给你,而不是发一个请求,也不执行什么
所以这是不行的,建议你把javascript:history.go(-3)换成跳转.本回答被提问者采纳
第3个回答  2018-03-12
你要重新定义你的FORM的ONSUBMIT事件的,重新装载数据。
第4个回答  2010-06-01
document.getElementById("刷新的控件id名字(如LinkButton1)").click();

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网