get current time without page refresh
I would like to get the current time without page refresh. However, the following code is only able to update the time by refresh manully.

Can anyone help me? Thanks in advance!

**-----currentTime.php---------**

    $(document).ready(function(){
                $.ajax({
                   type: "POST",
                   url: "test.php",
                   success: function(msg){
                     $("#results").append(msg);
                   }
                 });
            });
    
    
    <p id="results"></p>

**---test.php----**

    <?php
    
    $CT = date('Y:m:d H:i:s', time());
    
    echo $CT;
    ?>



get current time without page refresh
===

I would like to get the current time without page refresh. However, the following code is only able to update the time by refresh manully.

Can anyone help me? Thanks in advance!

**-----currentTime.php---------**

    $(document).ready(function(){
                $.ajax({
                   type: "POST",
                   url: "test.php",
                   success: function(msg){
                     $("#results").append(msg);
                   }
                 });
            });
    
    
    <p id="results"></p>

**---test.php----**

    <?php
    
    $CT = date('Y:m:d H:i:s', time());
    
    echo $CT;
    ?>


