1.js控制页面只刷新一次
window.onload(){
if(location.href.indexOf(‘#reloaded‘)==-1){
location.href=location.href+"#reloaded";
location.reload();
}
}
2.第二种只刷新一次
$(function(){
if($.cookie("refresh")!="no"){
setTimeout(function(){
window.location.reload();
$.cookie("refresh","no");
},5000);
}
});
3.
function refresh(){ window.location.reload(); setTimeout(refresh , 5000); }
原文地址:https://www.cnblogs.com/sjzgk/p/10717698.html
时间: 2024-10-01 07:02:42