jQuery 1.0.2

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

                // 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( type, url, params,function(res, status){

            if ( status == "success" || !ifModified && status == "notmodified" ) {
                // Inject the HTML into all the matched elements
                self.html(res.responseText).each( callback, [res.responseText, status] );

                // Execute all the scripts inside of the newly-injected HTML
                jQuery("script", self).each(function(){
                    if ( this.src )
                        jQuery.getScript( this.src );
                    else
                        eval.call( window, this.text || this.textContent || this.innerHTML || "" );