jquery ajax调用php方法

jquery ajax方法:

   	jQuery.ajax({
		   type: "POST",
		   url: "/v_ajax.php",
		   data: "action=getUmsg&u="+winduid,
		   success: function(r_msg){
                            var flag = jQuery(r_msg).find("flag").text();
});

 php端返回:

       header('Content-Type: text/xml');
    echo "<?xml version='1.0' encoding='gbk'?>";
    echo "<response>";
    echo "<flag>true</falg>";
    echo "</response>";

你可能感兴趣的:(jquery,PHP,Ajax,xml)