什么真正OO? javascript 不用prototype 你怎么模拟继承呢??

解决方案 »

  1.   

    你不妨看看这个
    http://dev.csdn.net/Develop/article/28/58977.shtm
      

  2.   

    <script>
    String.prototype.test = function() {
       alert("this is a test by stefli, say " + this);
    }
    var s = "hello";
    s.test();
    </script>
      

  3.   

    犀牛书上有讲解(ajax in action附录好像也有),下个电子书,自己看吧。
      

  4.   

    to LZ
    看第三个方法就是继承...
    只不过..那个得到prototype
    http://community.csdn.net/Expert/topic/4711/4711080.xml?temp=5.173892E-02