8.7w+
社区成员
<script type="text/javascript">
$(document).ready(function () {
setInterval("startRequest()", 300000);
//setInterval这个函数会根据后面定义每隔5分钟执行一次前面那个函数
});
function startRequest() {
$.ajax({
url: "r.aspx",
type: "get",
async: false,
cache: false,
contentType: "application/x-www-form-urlencoded; charset=utf-8",
success: function (data, status) {
$("#show").html(data);
},
error: function () {
$("#show").html("当前网络异常!");
}
});
}
</script>
<div id="show"></div>