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="介绍人会员编号可用";
                   }
                }
            }
  • 相关阅读:
    rsync+inotify实现实时同步案例
    Redis安装笔记
    监控软件munin安装设置
    Let’s Encrypt Wildcard 免费泛域名SSL证书获取安装
    [转载]真正的inotify+rsync实时同步 彻底告别同步慢
    PAT L1-009 N个数求和(运用GCD进行通分)
    文件的上传下载
    关系型数据库 VS 非关系型数据库
    python的局部变量,全局变量,类变量,实例变量
    Python 常用模块大全(整理)
  • 原文地址:https://www.cnblogs.com/htht66/p/1142688.html
Copyright © 2011-2022 走看看