Class 类名
Default 默认属性 Public 属性 Private 变量 Public Sub 过程() Public Function 函数() Sub Class_Initialize() '初始化事件过程 Sub Class_Terminate() '终止事件过程 Property Set/Get/Let name '属性操作过程 End Class |
[Public [Default]| Private] Property Get name [(arglist)] [statements] [[Set] name = expression] '设置返回值 [Exit Property] [statements] [[Set] name = expression] End Property |
[Public | Private] Property Set name( [arglist,]
reference) [statement] [Exit Property] [statement] End Property |
[Public | Private] Property Let name ( [arglist,]
value) [statement] [Exit Property] [statement] End Property |
Class tancheng public name1, age1, sex1 public property get name name = name1 end property public property let name(value) name1 = value & value end property end class dim a set a = new tancheng a.name="abcd" document.write( a.name ) 注:显示结果为 abcdabcd |