prototype是原型属性 只有在 new a();的时候才会存在
而且 你的function a()里面return了this.c那么就算你 new a();返回的始终是true这样就不会出错了function a()
{
this.b = true;
}
a.prototype.c = false;var aa = new a();
alert(aa.b);
alert(aa.c);

解决方案 »

  1.   

    prototype是原型属性   只有在   new   a();的时候才会存在 
    也可以的!
    function a()
    {
    this.b = true;
    }
    a.prototype.c = false;var aa = new a();
    aa.b=false;
    alert(aa.b);
    alert(aa.c);
      

  2.   

    function a()
    {
      this.c=true;
      return this.c;
    }
    a.prototype.c=false;
    alert(a());//怎么还是true呀?怎么改变成false?==>
    这个过程是这样的:
    a()其实创建了一个对象,然后通过prototype给这个对象添加了属性c,并初始化为false,然后执行函数体,在函数体中,又把属性c的值修改为true,最后返回c,所以会显示true
      

  3.   

    <script language="javascript" type="text/javascript">
    function a()
    {
      this.c=true;
      return this.c;
    }
    var x=new a();
    x.c=false;
    alert(x.c);
    </script>