jQuery.isEmptyObject()Method

jQuery 杂项方法jQuery Miscellaneous Methods

Example

Returns the index value of the specified element in the array

$(function () { function fun( html ){ document.body.innerHTML += "<br>" + html; } fun($.isEmptyObject({})); // true fun($.isEmptyObject({ foo: "bar" })); // false })

Try it yourself »

Definition and Usage

$.isEmptyObject() function is used to check whether an object is empty (does not contain any properties).


Syntax

$.isEmptyObject( object )

Parameters Description
object object Type The object that needs to be checked whether it is empty.


jQuery 杂项方法jQuery Miscellaneous Methods

Other Extensions