通过jquery实现setInterval定时执行
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
</head>
<body>
<script>
function gx(){
$.get("http://localhost/study/project/6/customer/index.php?c=online&m=index");
}
window.setInterval("gx()",1000*2);
</script>
</body>
</html>