源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

jquery isType() 类型判断代码

  • 时间:2020-08-09 22:33 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:jquery isType() 类型判断代码
[u]复制代码[/u] 代码如下:
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 ); },
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部