主页 > 知识库 > ajax的 responseXML返回接受 asp

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在后台传递数据问题

标签:深圳 抚州 晋城 伊春 威海 崇左 铜川 西藏

巨人网络通讯声明:本文标题《ajax的 responseXML返回接受 asp》,本文关键词  ajax,的,responseXML,返回,接受,;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 下面列出与本文章《ajax的 responseXML返回接受 asp》相关的同类信息!
  • 本页收集关于ajax的 responseXML返回接受 asp的相关信息资讯供网民参考!
  • 推荐文章