jQuery 1.0.4 - New Wave Javascript(js源文件)

2019-06-03 09:49:42刘景俊

    },
    load: function( url, params, callback, ifModified ) {
        if ( url.constructor == Function )
            return this.bind("load", url);

        callback = callback || function(){};

        // Default to a GET request
        var type = "GET";

        // If the second parameter was provided
        if ( params ) {
            // If it's a function
            if ( params.constructor == Function ) {
                // We assume that it's the callback
                callback = params;
                params = null;

            // Otherwise, build a param string
            } else {
                params = jQuery.param( params );
                type = "POST";
            }
        }

        var self = this;

        // Request the remote document
        jQuery.ajax({
            url: url,
            type: type,
            data: params,
            ifModified: ifModified,
            complete: function(res, status){
                if ( status == "success" || !ifModified && status == "notmodified" ) {