update data in the div

后端 未结 3 1564

I have a problem with updating the data I display from my db. Initially, when the page opens I display the date corresponding to the current date but then the user can chang

3条回答
  •  無奈伤痛
    2020-12-12 02:31

    This is a vast question, not very specific. Checkout more about AJAX requests - basically from javascript you will have a call to the server that retrieves your data. This is a snippet from the javascript library jQuery :

       $.ajax({
      type: "POST",
      url: "emails.php",
      data: { user: "John" }
    }).done(function( msg ) {
      $('teammembers').html(msg);
    });
    

    hope this will give you a starting point

提交回复
热议问题