1. jquery ajax方法:  
  2. jQuery.ajax({  
  3.            type: "POST",  
  4.            url: "/fvim/v_ajax.php",  
  5.            data: "action=getUmsg&u="+winduid,  
  6.            success: function(r_msg){  
  7.                             var flag = jQuery(r_msg).find("flag").text();  
  8.                             if(flag == "true"){  
  9.                                 var uid = jQuery(r_msg).find("uid").text();       
  10.                            }  
  11.                         }  
  12.                 }); 

php后台处理:

 

  1. header('Content-Type: text/xml');  
  2. echo "<?xml version='1.0' encoding='gbk'?>";  
  3. echo "<response>";  
  4. echo "<flag>true</flag>";  
  5. echo "</response>"