window.location.reload(); 不刷新当前页面问题
function checkADDUser(){
var t = true;
$("#Huiform input").each(function(index, element) {
if($.trim($(this).val())==""){
$(this).focus(); t = false;
layer.msg('添加失败,请填写完整.')
return false;
}
else{
//alert('添加成功!');
//parent.location.reload();
// window.location.reload();
window.location.reload();
return false;
}
});
return t;
}
});试过了window.location.reload(); parent.location.reload(); 都不能刷新出最新数据
相关推荐
js刷新当前页面
在实际应用的时候,重新刷新页面的时候,我们通常使用: location.reload() 或者是 history.go(0) 来做。因为这种做法就像是客户端点F5刷新页面,所以页面的method="post"的时候,会出现"网页过期"的提示。那是因为Session的安全保护机制。可以想到: 当调用 location.reload() 方法的时候, aspx页面此时在服务端内存里已经存在, 因此必定是 IsPostback 的。如果有这种应用: 我们需要重新加载该页面,也就是说我们期望页面能够在服务端重新被创建, 我们期望是 Not IsPostback 的。这里,location.replace() 就可以完成此任务。被replace的页面每次都在服务端重新生成。
window.open的页面如何刷新(父页面)上层页面
代码如下: this.ClientScript.RegisterStartupScript(this.GetType(), this.Title, “window.opener.location.reload();alert(‘销帐成功!’);”, true); 主要是这段js代码:window.opener.location.reload(); 如果没特殊要求,可以考虑用div
Javascript刷新页面的几种方法
Javascript刷新页面的几种方法 1.页面自动刷新 2.页面自动跳转 3.页面自动刷新js版 开窗时刷新 关闭时刷新
刷新页面的几种方法小结(JS,ASP.NET)
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 自动刷新页面的方法: 1.页面自动刷新:把如下代码加入<head>区域中 <meta http-equiv=”refresh”
javascript刷新父页面的各种方法汇总
用iframe、弹出子页面刷新父页面iframe [removed] parent.location.reload(); [removed] 弹出子页面 [removed] window.opener.location.reload(); [removed] 子窗口刷新父窗口 [removed] self.opener.location.reload(); [removed] 刷新以open()方法打开的窗口 [removed] win


