beebe_3 发表于 2017-3-21 12:47:50

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]
查看完整版本: jquery ajax调用php方法