我是靠谱客的博主 壮观世界,这篇文章主要介绍AJAX之xmlHttp,现在分享给大家,希望可以做个参考。

AJAX之xmlHttp

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<script type="text/javascript" language="javascript"> <!-- //以XML求取数据 function XmlPost(theEmail) {   var webFileUrl = "../User/CheckUser.aspx?LogonName=" + theEmail;   var result = "";         if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } else if (window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); }       //var xmlHttp = new ActiveXObject("MSXML2.XMLHTTP");      xmlHttp.open("POST", webFileUrl, false);      xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");       xmlHttp.send("");            xmlHttp.onreadystatechange=function()    {    if (xmlHttp.readyState==4)    {    result = xmlHttp.responseText;    }    }    if(xmlHttp.status!=200)    {    alert ('网络故障(xmlHttp.status='+xmlHttp.status+'),请稍后再试!');    }    result = xmlHttp.responseText;       result = result.substring(0,result.indexOf("?EX"));         if(result != "false")      {             return true;      }      else      {        return false;      }    }    //-->    </script>''' <summary>''' 检测用户是否存在<文件名:../User/CheckUser.aspx>''' </summary>'''    <remarks>Created by dzh @2006/06/27 18:22</remarks>Partial Class Web_User_CheckUser    Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Request.QueryString("LogonName") Is Nothing Then Response.Write("false" + "?EX") Response.End() Exit Sub End If If (New EasyClick.EasyBusiness.UserBusiness).GetUserByLogonName(Request.QueryString("LogonName").ToString) Is Nothing Then Response.Write("false" + "?EX") Response.End() Exit Sub Else Response.Write("true" + "?EX") Response.End() Exit Sub End If End SubEnd Class
登录后复制

以上就是AJAX之xmlHttp的内容,更多相关内容请关注靠谱客(www.uoften.com)!


最后

以上就是壮观世界最近收集整理的关于AJAX之xmlHttp的全部内容,更多相关AJAX之xmlHttp内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(102)

评论列表共有 0 条评论

立即
投稿
返回
顶部