⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dojo.js.uncompressed.js

📁 这是一个ajax的例子大家好好的看看就是一个鱼眼的效果
💻 JS
📖 第 1 页 / 共 5 页
字号:
//in the hostenvs since hostenv_browser can read djConfig from a//script tag's attribute.(function(){	var mp = dojo.config["modulePaths"];	if(mp){		for(var param in mp){			dojo.registerModulePath(param, mp[param]);		}	}})();//Load debug code if necessary.if(dojo.config.isDebug){	dojo.require("dojo._firebug.firebug");}if(dojo.config.debugAtAllCosts){	dojo.config.useXDomain = true;	dojo.require("dojo._base._loader.loader_xd");	dojo.require("dojo._base._loader.loader_debug");	dojo.require("dojo.i18n");}if(!dojo._hasResource["dojo._base.lang"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.dojo._hasResource["dojo._base.lang"] = true;dojo.provide("dojo._base.lang");// Crockford (ish) functionsdojo.isString = function(/*anything*/ it){	//	summary:	//		Return true if it is a String	return !!arguments.length && it != null && (typeof it == "string" || it instanceof String); // Boolean}dojo.isArray = function(/*anything*/ it){	//	summary:	//		Return true if it is an Array	return it && (it instanceof Array || typeof it == "array"); // Boolean}/*=====dojo.isFunction = function(it){	// summary: Return true if it is a Function	// it: anything	//	return: Boolean}=====*/dojo.isFunction = (function(){	var _isFunction = function(/*anything*/ it){		return it && (typeof it == "function" || it instanceof Function); // Boolean	};	return dojo.isSafari ?		// only slow this down w/ gratuitious casting in Safari since it's what's b0rken		function(/*anything*/ it){			if(typeof it == "function" && it == "[object NodeList]"){ return false; }			return _isFunction(it); // Boolean		} : _isFunction;})();dojo.isObject = function(/*anything*/ it){	// summary: 	//		Returns true if it is a JavaScript object (or an Array, a Function	//		or null)	return it !== undefined &&		(it === null || typeof it == "object" || dojo.isArray(it) || dojo.isFunction(it)); // Boolean}dojo.isArrayLike = function(/*anything*/ it){	//	summary:	//		similar to dojo.isArray() but more permissive	//	description:	//		Doesn't strongly test for "arrayness".  Instead, settles for "isn't	//		a string or number and has a length property". Arguments objects	//		and DOM collections will return true when passed to	//		dojo.isArrayLike(), but will return false when passed to	//		dojo.isArray().	//	return:	//		If it walks like a duck and quicks like a duck, return `true`	var d = dojo;	return it && it !== undefined &&		// keep out built-in constructors (Number, String, ...) which have length		// properties		!d.isString(it) && !d.isFunction(it) &&		!(it.tagName && it.tagName.toLowerCase() == 'form') &&		(d.isArray(it) || isFinite(it.length)); // Boolean}dojo.isAlien = function(/*anything*/ it){	// summary: 	//		Returns true if it is a built-in function or some other kind of	//		oddball that *should* report as a function but doesn't	return it && !dojo.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it)); // Boolean}dojo.extend = function(/*Object*/ constructor, /*Object...*/ props){	// summary:	//		Adds all properties and methods of props to constructor's	//		prototype, making them available to all instances created with	//		constructor.	for(var i=1, l=arguments.length; i<l; i++){		dojo._mixin(constructor.prototype, arguments[i]);	}	return constructor; // Object}dojo._hitchArgs = function(scope, method /*,...*/){	var pre = dojo._toArray(arguments, 2);	var named = dojo.isString(method);	return function(){		// arrayify arguments		var args = dojo._toArray(arguments);		// locate our method		var f = named ? (scope||dojo.global)[method] : method;		// invoke with collected args		return f && f.apply(scope || this, pre.concat(args)); // mixed 	} // Function}dojo.hitch = function(/*Object*/scope, /*Function|String*/method /*,...*/){	//	summary: 	//		Returns a function that will only ever execute in the a given scope. 	//		This allows for easy use of object member functions	//		in callbacks and other places in which the "this" keyword may	//		otherwise not reference the expected scope. 	//		Any number of default positional arguments may be passed as parameters 	//		beyond "method".	//		Each of these values will be used to "placehold" (similar to curry)	//		for the hitched function. 	//	scope: 	//		The scope to use when method executes. If method is a string, 	//		scope is also the object containing method.	//	method:	//		A function to be hitched to scope, or the name of the method in	//		scope to be hitched.	//	example:	//	|	dojo.hitch(foo, "bar")(); 	//		runs foo.bar() in the scope of foo	//	example:	//	|	dojo.hitch(foo, myFunction);	//		returns a function that runs myFunction in the scope of foo	if(arguments.length > 2){		return dojo._hitchArgs.apply(dojo, arguments); // Function	}	if(!method){		method = scope;		scope = null;	}	if(dojo.isString(method)){		scope = scope || dojo.global;		if(!scope[method]){ throw(['dojo.hitch: scope["', method, '"] is null (scope="', scope, '")'].join('')); }		return function(){ return scope[method].apply(scope, arguments || []); }; // Function	}	return !scope ? method : function(){ return method.apply(scope, arguments || []); }; // Function}/*=====dojo.delegate = function(obj, props){	//	summary:	//		returns a new object which "looks" to obj for properties which it	//		does not have a value for. Optionally takes a bag of properties to	//		seed the returned object with initially. 	//	description:	//		This is a small implementaton of the Boodman/Crockford delegation	//		pattern in JavaScript. An intermediate object constructor mediates	//		the prototype chain for the returned object, using it to delegate	//		down to obj for property lookup when object-local lookup fails.	//		This can be thought of similarly to ES4's "wrap", save that it does	//		not act on types but rather on pure objects.	//	obj:	//		The object to delegate to for properties not found directly on the	//		return object or in props.	//	props:	//		an object containing properties to assign to the returned object	//	returns:	//		an Object of anonymous type	//	example:	//	|	var foo = { bar: "baz" };	//	|	var thinger = dojo.delegate(foo, { thud: "xyzzy"});	//	|	thinger.bar == "baz"; // delegated to foo	//	|	foo.thud == undefined; // by definition	//	|	thinger.thud == "xyzzy"; // mixed in from props	//	|	foo.bar = "thonk";	//	|	thinger.bar == "thonk"; // still delegated to foo's bar}=====*/dojo.delegate = dojo._delegate = function(obj, props){	// boodman/crockford delegation	function TMP(){};	TMP.prototype = obj;	var tmp = new TMP();	if(props){		dojo.mixin(tmp, props);	}	return tmp; // Object}dojo.partial = function(/*Function|String*/method /*, ...*/){	//	summary:	//		similar to hitch() except that the scope object is left to be	//		whatever the execution context eventually becomes.	//	description:	//		Calling dojo.partial is the functional equivalent of calling:	//		|	dojo.hitch(null, funcName, ...);	var arr = [ null ];	return dojo.hitch.apply(dojo, arr.concat(dojo._toArray(arguments))); // Function}dojo._toArray = function(/*Object*/obj, /*Number?*/offset, /*Array?*/ startWith){	//	summary:	//		Converts an array-like object (i.e. arguments, DOMCollection) to an	//		array. Returns a new Array with the elements of obj.	//	obj:	//		the object to "arrayify". We expect the object to have, at a	//		minimum, a length property which corresponds to integer-indexed	//		properties.	//	offset:	//		the location in obj to start iterating from. Defaults to 0.	//		Optional.	//	startWith:	//		An array to pack with the properties of obj. If provided,	//		properties in obj are appended at the end of startWith and	//		startWith is the returned array.	var arr = startWith||[];	for(var x = offset || 0; x < obj.length; x++){		arr.push(obj[x]);	}	return arr; // Array}dojo.clone = function(/*anything*/ o){	// summary:	//		Clones objects (including DOM nodes) and all children.	//		Warning: do not clone cyclic structures.	if(!o){ return o; }	if(dojo.isArray(o)){		var r = [];		for(var i = 0; i < o.length; ++i){			r.push(dojo.clone(o[i]));		}		return r; // Array	}	if(!dojo.isObject(o)){		return o;	/*anything*/	}	if(o.nodeType && o.cloneNode){ // isNode		return o.cloneNode(true); // Node	}	if(o instanceof Date){		return new Date(o.getTime());	// Date	}	// Generic objects	var r = new o.constructor(); // specific to dojo.declare()'d classes!	for(var i in o){		if(!(i in r) || r[i] != o[i]){			r[i] = dojo.clone(o[i]);		}	}	return r; // Object}dojo.trim = function(/*String*/ str){	// summary: 	//		trims whitespaces from both sides of the string	// description:	//		This version of trim() was selected for inclusion into the base due	//		to its compact size and relatively good performance (see Steven	//		Levithan's blog:	//		http://blog.stevenlevithan.com/archives/faster-trim-javascript).	//		The fastest but longest version of this function is located at	//		dojo.string.trim()	return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');	// String}}if(!dojo._hasResource["dojo._base.declare"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.dojo._hasResource["dojo._base.declare"] = true;dojo.provide("dojo._base.declare");// this file courtesy of the TurboAjax group, licensed under a Dojo CLAdojo.declare = function(/*String*/ className, /*Function|Function[]*/ superclass, /*Object*/ props){	//	summary: 	//		Create a feature-rich constructor from compact notation	//	className:	//		The name of the constructor (loosely, a "class")	//		stored in the "declaredClass" property in the created prototype	//	superclass:	//		May be null, a Function, or an Array of Functions. If an array, 	//		the first element is used as the prototypical ancestor and	//		any following Functions become mixin ancestors.	//	props:	//		An object whose properties are copied to the	//		created prototype.	//		Add an instance-initialization function by making it a property 	//		named "constructor".	//	description:	//		Create a constructor using a compact notation for inheritance and	//		prototype extension. 	//	//		All superclasses (including mixins) must be Functions (not simple Objects).	//	//		Mixin ancestors provide a type of multiple inheritance. Prototypes of mixin 	//		ancestors are copied to the new class: changes to mixin prototypes will	//		not affect classes to which they have been mixed in.	//	//		"className" is cached in "declaredClass" property of the new class.	//	//	example:	//	|	dojo.declare("my.classes.bar", my.classes.foo, {	//	|		// properties to be added to the class prototype	//	|		someValue: 2,	//	|		// initialization function	//	|		constructor: function(){	//	|			this.myComplicatedObject = new ReallyComplicatedObject(); 	//	|		},	//	|		// other functions	//	|		someMethod: function(){ 	//	|			doStuff(); 	//	|		}	//	|	);	// process superclass argument	// var dd=dojo.declare, mixins=null;	var dd = arguments.callee, mixins;	if(dojo.isArray(superclass)){		mixins = superclass;		superclass = mixins.shift();	}	// construct intermediate classes for mixins	if(mixins){		dojo.forEach(mixins, function(m){			if(!m){ throw(className + ": mixin #" + i + " is null"); } // It's likely a required module is not loaded			superclass = dd._delegate(superclass, m);		});	}	// prepare values	var init = (props||0).constructor, ctor = dd._delegate(superclass), fn;	// name methods (experimental)	for(var i in props){ if(dojo.isFunction(fn = props[i]) && !0[i]){fn.nom = i;} } // 0[i] checks Object.prototype	// decorate prototype	dojo.extend(ctor, {declaredClass: className, _constructor: init, preamble: null}, props || 0); 	// special help for IE	ctor.prototype.constructor = ctor;	// create named reference	return dojo.setObject(className, ctor); // Function};dojo.mixin(dojo.declare, {	_delegate: function(base, mixin){		var bp = (base||0).prototype, mp = (mixin||0).prototype;		// fresh constructor, fresh prototype		var ctor = dojo.declare._makeCtor();		// cache ancestry		dojo.mixin(ctor, {superclass: bp, mixin: mp, extend: dojo.declare._extend});		// chain prototypes		if(base){ctor.prototype = dojo._delegate(bp);}		// add mixin and core		dojo.extend(ctor, dojo.declare._core, mp||0, {_constructor: null, preamble: null});		// special help for IE		ctor.prototype.constructor = ctor;		// name this class for debugging		ctor.prototype.declaredClass = (bp||0).declaredClass + '_' + (mp||0).declaredClass;		return ctor;	},	_extend: function(props){		for(var i in props){ if(dojo.isFunction(fn=props[i]) && !0[i]){fn.nom=i;} }		dojo.extend(this, props);	},	_makeCtor: function(){		// we have to make a function, but don't want to close over anything		return function(){ this._construct(arguments); };	},	_core: { 		_construct: function(args){			var c=args.callee, s=c.superclass, ct=s&&s.constructor, m=

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -