关于JavaScript中isPrototypeOf函数作用和使用实例
来源:才华咖 本文已影响2.08W人
来源:才华咖 本文已影响2.08W人
JavaScript中isPrototypeOf函数方法是返回一个布尔值,指出对象是否存在于另一个对象的原型链中。使用方法:
代码如下:
ototypeOf(object2)
其中object1为必选项,一个对象的实例。
object2为必选项,另一个对象,将要检查其原型链。
如果 object2 的 原型链中包含object1,那么JavaScript中isPrototypeOf函数方法返回 true。
原型链可以用来在同一个对象类型的'不同实例之间共享功能。
如果 object2 不是一个对象或者 object1 没有出现在 object2 中的原型链中,JavaScript中isPrototypeOf函数方法将返回 false。
以下示例阐述了JavaScript中isPrototypeOf函数方法的用法。
代码如下:
function test(){var re = new RegExp; //初始化变量。return(ototypeOf(re)); //返回 true。}
JavaScript中push(),join() 函数实例详解
Javascript时间格式format函数的两种使用方法
whats your plan for dragon boat festival英语作文
Efforts Urged to Improve Womens Reproductive Health英语阅读
JavaScript fontcolor方法入门实例
JavaScript在Android的WebView中parseInt函数转换不正确
Zend studio for eclipse中使php可以调用mysql相关函数的设置方
关于javascript中encodeURI和decodeURI的使用方法
英语阅读:VIT declines to acquire Ang Mo Kio property
关于异步JavaScript编程中的Promise使用方法
Javascript实例教程如何使用HoTMetal
关于 response方法的javascript asp教程第六课
JavaScript instanceof 的使用方法有哪些
JavaScript中创建字典对象(dictionary)的实例
关于javascript中cookie对象用法的实例分析
Why Public Speaking Is So Important 公共演说的重要性大学英语
My Happy Times During Winter Vacation初中英语作文
我的英语演讲稿living at present is my top concern
javascript中for/in循环以及常见的使用技巧
初中英语写作范文:My Happy Times During Winter Vacation
PHP中CURL的CURLOPT-POSTFIELDS参数使用细节
countif函数的使用方法 COUNTIF函数的16种公式【通用多篇】
少儿英语小故事:She Practices Flips for the Olympic
JavaScript里四舍五入函数round的用法实例
英语作文Let the Surprise Speak of Your Love
Say No to Pirated Products英语四级作文
Thinkpad笔记本开机显示Tointerrruptnormalstartup解决方法
PowerPoint2007中SmartArt的使用方法
泛议中函使用技巧
Spring Festival is My Favorite Festival英语作文
私家车的坏处The Disadvantages of Private Cars英语作文
The Impact of Information Explosion高中英语作文
JavaScript中Cookie操作实际案例
初中《函数的使用》说课稿
关于JavaScript中isPrototypeOf函数作用和使用实例
JavaScript中Function函数
英语作文:my favorite sports
JavaScript中的style.cssText使用教程分解
初中英语作文To Bea Computer Expert Is My Ideal
My favorite Sports英语作文