每个对象都有一个prototype属性,这个属性指向了一个prototype对象.
new操作符生成的新对象的prototype属性值和构造方法的prototype属性值是一致的
alert(String.prototype.isPrototypeOf(new String()));//true
alert(String.prototype.isPrototypeOf({}));//false
alert(Object.prototype.isPrototypeOf({}));//true

解决方案 »

  1.   

    var a={};
    b=String.prototype.isPrototypeOf(a)你这个地方理解反过来了,应该是
    alert(Object.prototype.isPrototypeOf(new String("123"))); //true
      

  2.   

    Object.prototype.x="xxxx"
    String.prototype.y="yyyy"
    var a="ss"
        alert(a.x)//弹出xxxx
        alert(a.y)//弹出yyyy
        b=Object.prototype.isPrototypeOf(a)
        alert(b)//弹出false
        b=String.prototype.isPrototypeOf(a)
        alert(b)//弹出false上面说明一个问题  a可以调用x,y 但是isPrototypeOf却不能弹出true    这是什么破方法????