How to Refresh DIV Content Without Reloading Page using jQuery?

http://crunchify.com/how-to-refresh-div-content-without-reloading-page-using-jquery-and-ajax/

 

<HTML>
<HEAD>
<TITLE>Crunchify Refresh Div without Reloading Page</TITLE>
<style type=”text/css”>
body {
    background-image:
        url(‘http://cdn3.crunchify.com/wp-content/uploads/2013/03/Crunchify.bg_.300.png’);
}
</style>
<script type=“text/javascript”
    src=“http://code.jquery.com/jquery-1.10.1.min.js”></script>
<script>
    $(document).ready(
            function() {
                setInterval(function() {
                    var randomnumber = Math.floor(Math.random() * 100);
                    $(‘#show’).text(
                            ‘I am getting refreshed every 3 seconds..! Random Number ==> ‘
                                    + randomnumber);
                }, ۳۰۰۰);
            });
</script>
</HEAD>
<BODY>
    <br>
    <br>
    <div id=“show” align=“center”></div>
    <div align=“center”>
        <p>
            by <a href=“http://crunchify.com”>Crunchify.com</a>
        </p>
    </div>
</BODY>
</HTML>
3 سال پیش

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *

This site uses Akismet to reduce spam. Learn how your comment data is processed.