JS inheritance.

zhaozj2021-02-16  53

// Implement inheritance

Function c_parent ()

{

THIS.TMP = "Hello World."

}

Function C_Child ()

{

}

C_Child.Prototype = new c_parent ();

VAR OBJ_CHILD = New C_CHILD ();

Wsh.echo (Obj_child.tmp);

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

New Post(0)