方法一:通过meta
标签
//content:表示刷新间隔,单位为秒s;
<meta http-equiv="refresh" content="3">
//content的第二个参数url为跳转url,设置为#则实现刷新
<meta http-equiv="refresh" content="3;url=#">
方法二:通过JS
setInterval(fresh, 1000);
function fresh(){
window.location.href=window.location.href;
}