jQuery 1.0.2

2019-06-03 18:50:05于海丽


                    // Clear from memory
                    xml = null;
                }
            }, timeout);

        // Send the data
        xml.send(data);
    },

    // Counter for holding the number of active queries
    active: 0,

    // Determines if an XMLHttpRequest was successful or not
    httpSuccess: function(r) {
        try {
            return !r.status && location.protocol == "file:" ||
                ( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
                jQuery.browser.safari && r.status == undefined;
        } catch(e){}

        return false;
    },

    // Determines if an XMLHttpRequest returns NotModified
    httpNotModified: function(xml, url) {
        try {
            var xmlRes = xml.getResponseHeader("Last-Modified");

            // Firefox always returns 200. check Last-Modified date
            return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
                jQuery.browser.safari && xml.status == undefined;
        } catch(e){}

        return false;
    },

    /* Get the data out of an XMLHttpRequest.
     * Return parsed XML if content-type header is "xml" and type is "xml" or omitted,