2010-06-23 190 views
1

我使用下面的代码 -自动刷新页面

jQuery(".form_" + form_count).html("<div id='message'></div>") 
    jQuery('#message').html("<center><h2><br><br>Thank You Your form has been submitted.</h2></center>") 
window.setTimeout(function() { 
    history.go(-1); 
}, 1950); 

现在我想的是,以前的页面已经被使用history.go(-1)加载后页面应该得到刷新。在此先感谢您的帮助。

回答

1

使用下面的函数来刷新重定向页面:

function refresh() 
{ 
    window.location.reload(true); 
} 
+0

我试着用你说什么,但实际上重新加载页面之前的页面我正在使用历史命令重定向。我想要的是,我使用history.go(-1)到达的页面应该被刷新。请帮助.. – ayush 2010-06-23 09:14:08

+0

因为您必须在您要返回的页面上编写此脚本 – 2010-06-23 09:26:44

-1

添加下面的meta标签在你以前的页面

<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> 
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> 
<META HTTP-EQUIV="Expires" CONTENT="-1">