간단히 이것을 사용
내용 = "5"5 초 대기 시간
<meta http-equiv="refresh" content="5" >
. 5 초 후에 페이지가 새로 고침됩니다.
또는 시도해보십시오.
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<title>Ajax Page</title>
<script>
setInterval(function() { autoloadpage(); }, 30000); // it will call the function autoload() after each 30 seconds.
function autoloadpage() {
$.ajax({
url: "URL of the destination page",
type: "POST",
success: function(data) {
$("div#wrapper").html(data); // here the wrapper is main div
}
});
}
</script>
</head>
<body>
<div id="wrapper">
contents will be changed automatically.
</div>
을 시도하는 또 다른 샷, 그냥 페이지의 아무 곳이 코드를 삽입 :
<script type="text/javascript">
setTimeout(function(){
location = ''
},60000)
</script>
이 시도하지만 페이지를 새로 고침하고 아니에요 나에게 내가 원하는 모든이 데이터 –
을 보여주는 데이터를 새로 고칩니다. 차트에 데이터가 표시되고 DB가 15-20 초마다 업데이트되므로 차트 만 새로 고쳐야합니다. –