jquery判斷是否爲對象或者數組

**是否爲對象** var obj = {a:1} var bool = $.isPlainObject(obj) 判斷是否爲對象 返回Boolean console.log(bool) //true **是否爲數組** var arr = [1,3] var bool = $.isArray(arr) 判斷是否爲數組 返回Boolean console.log(bool) //
相關文章
相關標籤/搜索