Latest web development tutorials

jQuery.isEmptyObject () method

jQuery Misc Methods jQuery Misc Methods

Examples

The index value of the specified element in the returned array

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

try it"

Definition and Usage

$ .isEmptyObject () Function is used to check whether the object is empty (does not contain any attributes).


grammar

$.isEmptyObject( object )

参数 描述
object object类型 需要进行判断是否为空的对象。


jQuery Misc Methods jQuery Misc Methods