zoukankan      html  css  js  c++  java
  • XMLHttpRequest IHttpHandler二

            var introId=document.getElementById("txtIntroId").value;
            var request;
            try
            {  
                request = new ActiveXObject("Msxml2.XMLHTTP");
            }
            catch(e)
            {
               try
               {
                    request = new ActiveXObject("Microsoft.XMLHTTP");
               }
               catch(e)
               {
                    try
                    {
                    }
                    catch(e)
                    {
                        request = new XMLHttpRequest();
                    }
               }
            }
            request.open("post","../Handler.ashx",true);
            request.setRequestHeader("Content-Type","application/x-www-form-urlencoded;"); //设置编码
            request.send("userId="+introId);
            request.onreadystatechange=function()
            {
                if(request.readyState==4)
                {
                   if(request.responseText=="0")
                   {
                    document.getElementById('msg_IntroId').innerHTML="介绍人会员编号输入有误";
                   }
                   else
                   {
                    document.getElementById('msg_IntroId').innerHTML="介绍人会员编号可用";
                   }
                }
            }
  • 相关阅读:
    Vmware安装CentOs7+gitlab(一)
    设计模式(一) 动态代理初尝试
    APP 技术支持
    App隐私条款
    Mac OS X中开启或关闭显示隐藏文件命令
    软件工程学习要点
    如何实现企业信息化
    记录一些flutter学习网址
    基于深度学习的语义分割
    对自动变速器的控制器建模
  • 原文地址:https://www.cnblogs.com/htht66/p/1142688.html
Copyright © 2011-2022 走看看