$(document).ready(function(){
setInterval (fetchdata,10000);
});
function fetchdata(){
console.log('hello');
$.ajax({
type:'post',
url : 'sendchat1.php',
data : {thePostID:thePostID},
success:function(response){
$("#middle").html(response);
}
<div class="middle" id="middle">
</div>
答案 0 :(得分:0)
如果您想专注于新的div,可以使用:
window.location.hash = '#middle';