Implement method overload test code

xiaoxiao2021-03-06  70

Function base () {

} Base.Prototype.a = function () {Alert ('a in base');}

Function derived () {

} Derived.Prototype = new base (); derived.prototype.base = new base (); derived.prototype.a = function () {Alert ('a in derived');}

VAR B = new base (); b.a (); var c = new derived ();

C.a (); c.base.a ();

转载请注明原文地址:https://www.9cbs.com/read-92107.html

New Post(0)