Transferred from: http://www.cnblogs.com/jenry/archive/2010/12/08/1900150.html
hasOwnProperty: is used to determine whether an object has a property or object that you give a name to. However, it is important to note that this method cannot check whether the object has this property in its prototype chain, and that the property must be a member of the object itself.
isprototypeof: is used to determine whether the object whose prototype chain is to be checked exists in the specified object instance, or True, otherwise returns false.
Instance try:
function SiteAdmin (nickname,sitename) { This. nickname=nickname; This. sitename=SiteName; } siteAdmin.prototype.showAdmin=function () {alert ( This. nickname+"is a"+ This. sitename+"the webmaster!"); }; SiteAdmin.prototype.showSite=function (siteurl) { This. siteurl=SiteURL; return This. sitename+"the address is"+ This. SiteURL; }; varmatou=NewSiteAdmin ("Fool's Wharf","Web front-end development"); varMatou2=NewSiteAdmin ("Fool's Wharf","Web front-end development"); Matou.age=" -";//matou.showadmin ();//Alert (Matou.showsite ("http://www.css88.com/"));Alert (Matou.hasownproperty ("Nickname"));//trueAlert (Matou.hasownproperty (" Age"));//trueAlert (Matou.hasownproperty ("Showadmin"));//falseAlert (Matou.hasownproperty ("SiteURL"));//falseAlert (SiteAdmin.prototype.hasOwnProperty ("Showadmin"));//trueAlert (SiteAdmin.prototype.hasOwnProperty ("SiteURL"));//falseAlert (SiteAdmin.prototype.isPrototypeOf (Matou))//trueAlert (SiteAdmin.prototype.isPrototypeOf (MATOU2))//true