• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    ajax的 responseXML返回接受 asp
    第一个文件   index.asp
    script language="javascript">
    var xmlHttp = false;    //ajax使用
    try {
      xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e2) {
        xmlHttp = false;
      }
    }
    if (!xmlHttp  typeof XMLHttpRequest != 'undefined') {
      xmlHttp = new XMLHttpRequest();
    }
    function callserver()
    {
     var url = "index.asp";
     xmlHttp.open("POST",url,true);
     xmlHttp.onreadystatechange = update;
        xmlHttp.setrequestheader("content-type","application/x-www-form-urlencoded");
     xmlHttp.send(null);
    }
    function update()
    {
     if(xmlHttp.readystate==4)
     {
      var xmldoc=xmlHttp.responseXML
      var info = xmldoc.getElementsByTagName("info")[0].text;
      alert(info);
     }
    }
    callserver();
    /script>

     

    第二个   login.asp

    %
    Response.ContentType="text/xml"
    response.Write("?xml version='1.0' encoding='GB2312' ?>")
    response.Write("root>")
    response.Write("info>love you/info>")
    response.Write("/root>")
    %>
    您可能感兴趣的文章:
    • Ajax中responseText返回的是一个页面而不是一个值
    • ajax的responseText乱码的问题的解决方法
    • jquery ajax学习笔记2 使用XMLHttpRequest对象的responseXML
    • Ajax request response 乱码解决方法
    • Ajax Throws Sys.WebForms.PageRequestManagerErrorException with Response.Redirect的解决方法
    • 关于Ajax中通过response在后台传递数据问题
    上一篇:xajax的FORM例子
    下一篇:PHP Ajax实现页面无刷新发表评论
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯 版权所有

    《增值电信业务经营许可证》 苏ICP备15040257号-8

    ajax的 responseXML返回接受 asp ajax,的,responseXML,返回,接受,