• λ我爱Aspx >> Asp.Net >> AJAX之xmlHttp
  • AJAX之xmlHttp

  • :aspxer  Դ:5iaspx  :2007-8-1 13:14:48  ؼ:ajax,xml
  • <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+'),请稍后再试!');

    Ҷƪл˵?
  • һƪSQL Server 2005 Reporting Services 初次使用感受
    һƪasp.net调用存储过程方法新解