首頁  >  工具  > $.isPlainObject(obj)

返回值:BooleanjQuery.isPlainObject(obj)

jQuery $.isPlainObject() 方法概述

測試對象是否是純粹的對象(通過 "{}" 或者 "new Object" 創(chuàng)建的)。

參數(shù)

objObjectV1.4

用于測試是否為純粹的對象

示例

描述:

測試是否為純粹的對象

jQuery 代碼:
jQuery.isPlainObject({}) // true
jQuery.isPlainObject("test") // false