Refresh div/element secara otomatis dengan javascript

Bismillah…

di banyak sosial media pasti menyediakan plugin untuk refresh data secara otomatis seperti FB,Twitter dan lainnya, dengan tujuan agar user lebih meresa lebih nyaman.

ok langsung saja berikut skripnya


<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
var otomatis = setInterval(
function ()
{
$('#div').load('record_count.php').fadeIn("slow");
}, 10000);
</script>

<body>
<div id="div"> </div>
</body>

Leave a comment

2 Comments

  1. gak usah refresh halaman lagi getu uda, maksudnya?

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: