Ajax每隔2秒自动请求服务端刷新页面

1、

window.onload = function () {
automatic();
}

2、

function automatic(){
//每隔两秒刷新一次页面
setTimeout(automatic,2*1000);

}

posted @ 2019-09-03 10:42  夏天丷  阅读(601)  评论(0编辑  收藏  举报