jQuery
function(data) 
            {
                if(data === "importtrue")
                {
                    $('#rebuildme').//function like .html
                } else {
                    $('#rebuildme').//function like .html
                }
            });
with t开发者_运维知识库his, i'd like create html with PHP code.
HTML/PHP
     <div id='rebuildme'><?php print_r( $_SESSION['ERROR'] );?>
The function is a result of a $.post and $_SESSION['ERROR'] is created on the page the ajax requests too.
In your jQuery you need to capture the result of that service call and append it to the DOM for #rebuildme if it returns anything valid. I would suggest making it return 404 or something semantic so that $.get() fails silently until it has something valid to return.
if(data === "importtrue"){
  $.get('/myservice/import',function(data){
    $('#rebuildme').append(data);
  });
}
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论