- jquery ajax方法:
- jQuery.ajax({
- type: "POST",
- url: "/fvim/v_ajax.php",
- data: "action=getUmsg&u="+winduid,
- success: function(r_msg){
- var flag = jQuery(r_msg).find("flag").text();
- if(flag == "true"){
- var uid = jQuery(r_msg).find("uid").text();
- }
- }
- });
php后台处理:
- header('Content-Type: text/xml');
- echo "<?xml version='1.0' encoding='gbk'?>";
- echo "<response>";
- echo "<flag>true</flag>";
- echo "</response>";