欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jquery isType() 類型判斷代碼

 更新時間:2011年02月14日 19:10:21   作者:  
jquery isType() 類型判斷代碼,需要的朋友可以參考下。
復(fù)制代碼 代碼如下:

class2type = {};
toString = Object.prototype.toString;
type: function( obj ) {
return obj == null ?
String( obj ) :
class2type[ toString.call(obj) ] || "object";
},

isFunction: function( obj ) {
return jQuery.type(obj) === "function";
},

isArray: Array.isArray || function( obj ) {
return jQuery.type(obj) === "array";
},

// A crude way of determining if an object is a window
isWindow: function( obj ) {
return obj && typeof obj === "object" && "setInterval" in obj;
},

isNaN: function( obj ) {
return obj == null || !rdigit.test( obj ) || isNaN( obj );
},

相關(guān)文章

最新評論