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="介绍人会员编号可用";
                   }
                }
            }
  • 相关阅读:
    模糊查询(排除%等通配符并支持不连续关键字查询)
    ideal中运行manven常用操作
    ideal项目启动及问题
    FastJSON 转换List<T> ,Map<T,T>泛型失败 处理方法
    MySQL的SELECT ...for update
    CouchDB客户端开发—Java版
    Spring Data JPA 实例查询
    第一章 计算机网络概述
    第二章 物理层(二)
    Java常考面试题(一)
  • 原文地址:https://www.cnblogs.com/htht66/p/1142688.html
Copyright © 2011-2022 走看看