zoukankan      html  css  js  c++  java
  • JS_对象的方法

    /*
    * o.name 这属性在IE下会返回 undefined, 如果o是匿名函数在标准浏览器下回返回"",非匿名函数会返回函数名.
    */
    <
    script type="text/javascript"> var o = function(){} o.myage = 18; o.myname = "shao"; o.prototype.show = "hello"; var a = new o(); alert(o.hasOwnProperty("myname"));     //true 检查属性("myname")是否为该对象(o)的静态属性,不考虑原型链属性 alert(o.prototype.isPrototypeOf(a));    //true 检查对象(a)是否为该对象(o)的原型 alert(o.propertyIsEnumerable("myname"));  //true 检查属性("myname")是否能被枚举,不考虑原型链属性 </script>
  • 相关阅读:
    chm文件生成
    java基础--集合
    java基础--多线程
    nexus
    java基础--IO流
    http与https
    java基础--数据结构
    mysql 优化
    maven依赖和传递
    java设计模式
  • 原文地址:https://www.cnblogs.com/somesayss/p/2783901.html
Copyright © 2011-2022 走看看