小白教程
所有教程
关于
Search
172.69.6.29
172.69.6.29
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Misc isemptyobject”的源代码
本页内容
上一节:
Misc_isarray
下一节:
Misc_isfunction
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:$.isEmptyObject()}}[[Category:jquery ref misc|21]] = jQuery.isEmptyObject()方法 = [[jquery ref misc|jQuery 杂项方法]] 返回数组中指定元素的索引值 <sample title="" desc="" lang="html" hererun="1"> $(function () { function fun( html ){ document.body.innerHTML += "<br>" + html; } fun($.isEmptyObject({})); // true fun($.isEmptyObject({ foo: "bar" })); // false }) </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script> </head> <body> <script> $(function () { function fun( html ){ document.body.innerHTML += "<br>" + html; } fun($.isEmptyObject({})); // true fun($.isEmptyObject({ foo: "bar" })); // false }) </script> </body> </html> </run> == 定义和用法 == $.isEmptyObject() 函数用于检查对象是否为空(不包含任何属性)。 == 语法 == $.isEmptyObject( object ) {| class="table table-striped table-hover" ! 参数 ! 描述 |- | object | object类型 需要进行判断是否为空的对象。 |} [[jquery ref misc|jQuery 杂项方法]]
返回至“
Misc isemptyobject
”。
上一节:
Misc_isarray
下一节:
Misc_isfunction