专灭零回复贴

解决方案 »

  1.   

    function setxmlhttp(xml_http) 
        { 
            g_xmlhttp = xml_http; 
        } 
        
        function downloaddata(url, callbackfunc) 
        { 
            if (!getxmlhttp()) 
            { 
                var xml_http = createxmlhttp(); 
                setxmlhttp(xml_http); 
            }         g_xmlhttp.onreadystatechange = callbackfunc; 
            g_xmlhttp.open("GET", url, true); 
            g_xmlhttp.send(null); 
        }
    括号乱七八糟的。严重鄙视 帖代码 不格式化......。不过用MyEclipse 写JS 还是可以原谅的
    1.!getxmlhttp() 这个方法在哪,没有看到。
    2.function setxmlhttp(xml_http) 
        { 
            g_xmlhttp = xml_http; 
        } 为什么 要多加这一段,没有必要。又不是JAVABEAN,玩什么 setter,getter
     function downloaddata(url, callbackfunc){
            var xml_http = createxmlhttp(); 
            xml_http.onrea...........=callbackfunc;
            xml_http.open(..........);
            xml_http.send(.........);
    }
    搞这么多。