can someone show me how to make a jquery ajax completion event.
$("#submit_js").click(function() {
    $.post(
      "user_submit.php", 
      {comment: $("#comment").val(), aid: imgnum}, 
      function(data){
        /*alert(data);*/
      });
});
when this POST request co开发者_运维技巧mpletes successfully, I want to show the message in a specific div instead of its earlier contents:
Your comment : $('#comment').val() was submitted successfully.
//I want to display the comment.
Put this inside your "on complete" callback function:
$( 'selector for your DIV' ).html ( 'your message' );
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论