YouTip LogoYouTip

Misc Isplainobject

# jQuery.isPlainObject() Method [![Image 3: jQuery Misc Methods](#)jQuery Misc Methods](#) ## Example Determine if an object is a plain object. $(function(){function fun(html){document.body.innerHTML += "
" + html; }fun($.isPlainObject({})); //true fun($.isPlainObject("test")); //false fun($.isPlainObject(document.location)); // false , returns true in IE 8}) [Try it Β»](#) * * * ## Definition and Usage The $.isPlainObject() function is used to determine if the specified parameter is a plain object. **Note:** Host objects (or other objects used by the browser host environment to complete the ECMAScript execution environment) are difficult to detect for cross-platform features. Therefore, for instances of these objects, $.isPlainObject() may return different results in different browsers. * * * ## Syntax _$_.isPlainObject( object ) | Parameter | Description | | :--- | :--- | | _object_ | Any type. The value to be checked. | * * jQuery Misc Methods](#)
← Misc IsxmldocMisc Isfunction β†’