实际上是执行到 if((xmlHttp.readyState == 4) && (xmlHttp.status == 200)) 
这儿就停了,也不知道这时候xmlHttp还有没有。

解决方案 »

  1.   

    function complete()
    {
    alert('exsist??')
    if(!xmlHttp)
    {
    alert('no');
    }
    if(xmlHttp)
    {
    alert('yes');
    }
    alert(xmlHttp.readyState);}
    如果改成这样,那么exsist??这句可以弹出来,但下面的YES,NO,xmlHttp.readyState就一个都弹不出来了。
    请问,这倒底咋回事呢?
      

  2.   

    function complete() 

     xmlHttp= A;
    alert(xmlHttp.readyState); if((xmlHttp.readyState == 4) && (xmlHttp.status == 200)) 
    .............加一句. 试试...........
      

  3.   

    Sorry !
    上面错了。你的A 不是全局的.
    xmlHttp 也不知怎么来的这样改把。
    <script> 
    var xmlHttp;

    function createXmlHttp()  
    {  
    var A=null;  
    try  
    {  
    A=new ActiveXObject("Msxml2.XMLHTTP")  
    }catch(e) 
    {  
    try  
    {  
    A=new ActiveXObject("Microsoft.XMLHTTP")  
    }catch(oc) 
    {  
    A=null  
    }  
    } if( !A && typeof XMLHttpRequest != "undefined" )  
    {  
    A=new XMLHttpRequest()  
    }  
    xmlHttp = A;
    return A  
    } 试试把。......