jquery isType() 类型判断代码

时间:2011-02-14    点击:116   
复制代码 代码如下:

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 );
},
获取css样式表内样式的js函数currentStyle(IE),defaultView(FF)
JavaScript与Image加载事件(onload)、加载状态(complete)
JQuery 选择器、过滤器介绍
AJAX分页的代码(后台asp.net)
基于jquery的图片的切换(以数字的形式)
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved