日期:2014-05-16  浏览次数:20651 次

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>";

1 楼 a584736479 2012-08-17  
代码明显少个‘{’
2 楼 a584736479 2012-08-17  
说错了  少个}