javascript reload div code example

Example 1: relode div

function updateDiv()
{ 
    $( "#here" ).load(window.location.href + " #here" );
}

Example 2: refresh page on div click

<div id="refresh" onClick="refreshPage()">refresh
    <!-- <button type="button" onClick="refreshPage()">Close</button> -->
</div>

<script>
function refreshPage(){
    window.location.reload();
} 
</script>

Example 3: ajax data not reflecting after refresh particular div jquery

$(document).ready(function() {
$.ajaxSetup({ cache: false });
setInterval(function() {
$('#loaddiv').load('teste.asp');
}, 1000);
});