jQuery 1.0.4 New Wave Javascript(js源文件)

2020-05-19 07:32:46易采站长站整理

                // Handle the global AJAX counter
                if ( s.global && ! –jQuery.active )
                    jQuery.event.trigger( “ajaxStop” );
                // Process result
                if ( s.complete ) s.complete(xml, status);
                // Stop memory leaks
                xml.onreadystatechange = function(){};
                xml = null;
            }
        };
        xml.onreadystatechange = onreadystatechange;
        // Timeout checker
        if(s.timeout > 0)
            setTimeout(function(){
                // Check to see if the request is still happening
                if (xml) {
                    // Cancel the request
                    xml.abort();
                    if ( !requestDone ) onreadystatechange( “timeout” );
                    // Clear from memory
                    xml = null;
                }
            }, s.timeout);
        // Send the data