已经有了loop2这个属性了
直接marquee.loop2="ssssss"; 赋值就行了。

解决方案 »

  1.   

    prototype 是对象类的原型进行扩展,而不是你 new 出来的实例。function Marquee(container,loop1)

        this.container = document.getElementById(container); 
        this.loop1 = document.getElementById(loop1); 
         
        this.start=function(){alert(this.loop2);}, 
        this.stop=function(){alert( 'stop ');} 

    Marquee.prototype.loop2="ssssss"; var marquee = new Marquee("container","loop1");